ENT-2131 Add comment about schema search path for PostgreSQL (#1080)

* Add documentation for schema search path
This commit is contained in:
Christian Sailer 2018-06-26 17:25:43 +01:00 committed by GitHub
parent a58eac6172
commit a60cd9d356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,6 +304,7 @@ To set up a database schema, use the following SQL:
ALTER DEFAULT privileges IN SCHEMA "[SCHEMA]" GRANT ALL ON tables TO "[USER]";
GRANT ALL ON ALL sequences IN SCHEMA "[SCHEMA]" TO "[USER]";
ALTER DEFAULT privileges IN SCHEMA "[SCHEMA]" GRANT ALL ON sequences TO "[USER]";
ALTER ROLE "[USER]" SET search_path = "[SCHEMA]";
Example node configuration for PostgreSQL:
@ -323,6 +324,10 @@ Example node configuration for PostgreSQL:
Note that:
* The ``database.schema`` property is optional
* If you provide a custom ``database.schema``, its value must either match the ``dataSource.user`` value to end up
on the standard schema search path according to the
`PostgreSQL documentation <https://www.postgresql.org/docs/9.3/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_, or
the schema search path must be set explicitly via the ``ALTER ROLE "[USER]" SET search_path = "[SCHEMA]"`` statement.
* The value of ``database.schema`` is automatically wrapped in double quotes to preserve case-sensitivity
(e.g. `AliceCorp` becomes `"AliceCorp"`, without quotes PostgresSQL would treat the value as `alicecorp`),
this behaviour differs from Corda Open Source where the value is not wrapped in double quotes