diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2021-01-30 19:14:31 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2021-01-30 19:44:29 +0100 |
commit | dfb75e478cacb33d277432e0df5e2f9a2a2b52d9 (patch) | |
tree | f22b9b6f1d6b5238ba2cfb23560a843d81f12821 /src/backend/utils/adt/jsonfuncs.c | |
parent | 65330622441d7ee08f768c4326825ae903f2595a (diff) | |
download | postgresql-dfb75e478cacb33d277432e0df5e2f9a2a2b52d9.tar.gz postgresql-dfb75e478cacb33d277432e0df5e2f9a2a2b52d9.zip |
Add primary keys and unique constraints to system catalogs
For those system catalogs that have a unique indexes, make a primary
key and unique constraint, using ALTER TABLE ... PRIMARY KEY/UNIQUE
USING INDEX.
This can be helpful for GUI tools that look for a primary key, and it
might in the future allow declaring foreign keys, for making schema
diagrams.
The constraint creation statements are automatically created by
genbki.pl from DECLARE_UNIQUE_INDEX directives. To specify which one
of the available unique indexes is the primary key, use the new
directive DECLARE_UNIQUE_INDEX_PKEY instead. By convention, we
usually make a catalog's OID column its primary key, if it has one.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/dc5f44d9-5ec1-a596-0251-dadadcdede98@2ndquadrant.com
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions