@@ -39,10 +39,9 @@ see the jar file there.
39
39
__Upgrade installations__
40
40
below*.
41
41
42
- *Not running PostgreSQL 9.1 or higher ? Use
42
+ *Avoiding `CREATE EXTENSION` for some reason ? Use
43
43
`LOAD 'libpljava-so-${project.version}';` instead of the `CREATE EXTENSION`
44
- command. (It works in later versions too, if you prefer it to
45
- `CREATE EXTENSION`.) Using a Mac? Be sure to add `.bundle` at the end of the file name
44
+ command. Using a Mac? Be sure to add `.bundle` at the end of the file name
46
45
in the `LOAD` command. Windows? Remove `lib` from the front. Something else?
47
46
Keep reading.*
48
47
@@ -187,7 +186,7 @@ Another approach is to save them to the server's configuration file.
187
186
If you wish PL/Java to be available for all databases in a cluster, it may
188
187
be more convenient to put the settings in the file than to issue
189
188
`ALTER DATABASE` for several databases, but `pg_ctl reload` will be needed
190
- to make changed settings effective. Starting with PostgreSQL 9.4,
189
+ to make changed settings effective.
191
190
`ALTER SYSTEM` may be used as an alternative to editing the file.
192
191
193
192
If you have several databases in the cluster and you favor the
@@ -197,9 +196,6 @@ sure that `CREATE EXTENSION` just works, in any database where PL/Java
197
196
is wanted. Different per-database settings can still be made if one
198
197
database needs them.
199
198
200
- For PostgreSQL releases [earlier than 9.2][pre92], the configuration file is
201
- the _only_ way to make your settings persistent.
202
-
203
199
$h2 Upgrade installations
204
200
205
201
PL/Java performs an upgrade installation if there is already an `sqlj` schema
@@ -215,10 +211,12 @@ $h2 Usage permission
215
211
216
212
Installation of PL/Java creates two "languages", `java` and `javau`.
217
213
Functions that specify `LANGUAGE javau` can be created only by superusers,
218
- and are subject to very few restrictions at runtime. Functions that specify
214
+ and PL/Java's default policy grants them some filesystem access. Functions that
215
+ specify
219
216
`LANGUAGE java` can be created by any user or role that has been granted
220
- `USAGE` permission `ON LANGUAGE java`. They run under a security manager that
221
- denies access to the host filesystem.
217
+ `USAGE` permission `ON LANGUAGE java`. The default policy grants them no extra
218
+ permissions. The exact permissions granted in either case can be customized
219
+ in [`pljava.policy`][policy].
222
220
223
221
__Note: For implications when running on Java 17 or later,
224
222
please see [JEP 411][jep411]__.
@@ -237,12 +235,10 @@ $h2 Special topics
237
235
238
236
Be sure to read these additional sections if:
239
237
240
- * You are installing to [a PostgreSQL release earlier than 9.2][pre92]
241
238
* You are installing on [a system using SELinux][selinux]
242
239
* You are installing on [Mac OS X][osx]
243
240
* You are installing on [Ubuntu][ubu] and the self-extracting jar won't work
244
241
245
- [pre92]: prepg92.html
246
242
[selinux]: selinux.html
247
243
[osx]: ../build/macosx.html
248
244
[ubu]: ../build/ubuntu.html
@@ -254,9 +250,10 @@ $h3 Puzzling error message from `CREATE EXTENSION`
254
250
ERROR: relation "see doc: do CREATE EXTENSION PLJAVA in new session"
255
251
already exists
256
252
257
- For PL/Java, `CREATE EXTENSION` (which works in PostgreSQL 9.1 and later) is a
258
- wrapper around installation via `LOAD` (which works in all versions PL/Java
259
- supports). A quirk of this arrangement is that PostgreSQL treats `LOAD` as a
253
+ For PL/Java, `CREATE EXTENSION` is a wrapper around installation via `LOAD`
254
+ (which was needed for PostgreSQL versions now of only historical interest,
255
+ and remains supported for cases where `CREATE EXTENSION` is too inflexible).
256
+ A quirk of this arrangement is that PostgreSQL treats `LOAD` as a
260
257
no-op for the remainder of a session once the library has been loaded, so
261
258
`CREATE EXTENSION pljava` works in a *fresh* session, but not in one where
262
259
PL/Java's native code is already in place.
@@ -283,7 +280,7 @@ Because PL/Java, by design, runs entirely in the backend process created
283
280
for each connection to PostgreSQL, to configure it does not require any
284
281
cluster-wide actions such as stopping or restarting the server, or editing
285
282
the configuration file; any necessary settings can be made in SQL over
286
- an ordinary connection (in PostgreSQL 9.2 and later, anyway) .
283
+ an ordinary connection.
287
284
288
285
_Caution: if you are installing a new, little-tested PL/Java build, be aware
289
286
that in the unexpected case of a crash, the `postmaster` will kick other
@@ -399,3 +396,4 @@ readable by the user running `postgres`, and set the `pljava.*` variables
399
396
accordingly.
400
397
401
398
[jep411]: https://github.com/tada/pljava/wiki/JEP-411
399
+ [policy]: ../use/policy.html
0 commit comments