You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Add primary keys and unique constraints to system catalogs
For those system catalogs that have a unique indexes, make a primarykey and unique constraint, using ALTER TABLE ... PRIMARY KEY/UNIQUEUSING INDEX.This can be helpful for GUI tools that look for a primary key, and itmight in the future allow declaring foreign keys, for making schemadiagrams.The constraint creation statements are automatically created bygenbki.pl from DECLARE_UNIQUE_INDEX directives. To specify which oneof the available unique indexes is the primary key, use the newdirective DECLARE_UNIQUE_INDEX_PKEY instead. By convention, weusually 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