functions in , which
provide read-only access.)
Only files within the database cluster directory can be accessed, unless the
- user is a superuser or given privileges of one of the pg_read_server_files,
+ user is a superuser or given privileges of one of the pg_read_server_files,
or pg_write_server_files roles, as appropriate for the function, but either a
relative or absolute path is allowable.
void (*rm_decode) (struct LogicalDecodingContext *ctx,
struct XLogRecordBuffer *buf);
} RmgrData;
-
+
Then, register your new resource
during
PostgreSQL startup.
The extension must remain in shared_preload_libraries as long as any
custom WAL records may exist in the system. Otherwise
PostgreSQL will not be able to apply or decode
Notes
Alternatively, you can construct
JSON values simply
- using
PostgreSQL-specific casts to
+ using
PostgreSQL-specific casts to
json and jsonb types.
SELECT
JSON_QUERY(js, '$.favorites[*].kind' ERROR ON ERROR)
FROM my_films;
-ERROR: more than one SQL/JSON item
+ERROR: more than one SQL/JSON item
expression
- IS NOT JSON
+ IS NOT JSON
{ VALUE | SCALAR | ARRAY | OBJECT }
{ WITH | WITHOUT } UNIQUE KEYS
SELECT
- js,
- js IS JSON "is json",
+ js,
+ js IS JSON "is json",
js IS NOT JSON "is not json",
js IS JSON SCALAR "is scalar",
js IS JSON OBJECT "is object",
js IS JSON ARRAY "is array"
-FROM
+FROM
(VALUES ('123'), ('"abc"'), ('{"a": "b"}'), ('[1,2]'), ('abc')) foo(js);
- js | is json | is not json | is scalar | is object | is array
+ js | is json | is not json | is scalar | is object | is array
------------+---------+-------------+-----------+-----------|-------------
123 | t | f | t | f | f
"abc" | t | f | t | f | f
- Use CROSS JOIN, so that the output includes
+ Use CROSS JOIN, so that the output includes
a row for every possible combination of rows from the left-hand
and the right-hand columns.
some JSON data about the films and create a view that
distributes the film genre, title, and director between separate columns:
-SELECT jt.* FROM
+SELECT jt.* FROM
my_films,
JSON_TABLE ( js, '$.favorites[*]' COLUMNS (
id FOR ORDINALITY,
Notes
Alternatively, you can construct
JSON values simply
- using
PostgreSQL-specific casts to
+ using
PostgreSQL-specific casts to
json and jsonb types.
rollforward will take considerably longer, so that technique only
offers a solution for disaster recovery, not high availability.
A standby server can also be used for read-only queries, in which case
- it is called a hot standby server. See
+ it is called a hot standby server. See
for more information.
The first seven lines report some of the most important parameter
settings.
The sixth line reports the maximum number of tries for transactions with
- serialization or deadlock errors (see
+ serialization or deadlock errors (see
for more information).
The eighth line reports the number of transactions completed
and intended (the latter being just the product of number of clients