postgresql/src/backend/utils/cache
Peter Eisentraut d6f96ed94e Allow specifying column list for foreign key ON DELETE SET actions
Extend the foreign key ON DELETE actions SET NULL and SET DEFAULT by
allowing the specification of a column list, like

    CREATE TABLE posts (
        ...
        FOREIGN KEY (tenant_id, author_id) REFERENCES users ON DELETE SET NULL (author_id)
    );

If a column list is specified, only those columns are set to
null/default, instead of all the columns in the foreign-key
constraint.

This is useful for multitenant or sharded schemas, where the tenant or
shard ID is included in the primary key of all tables but shouldn't be
set to null.

Author: Paul Martinez <paulmtz@google.com>
Discussion: https://www.postgresql.org/message-id/flat/CACqFVBZQyMYJV=njbSMxf+rbDHpx=W=B7AEaMKn8dWn9OZJY7w@mail.gmail.com
2021-12-08 11:13:57 +01:00
..
attoptcache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
catcache.c Add "pg_database_owner" default role. 2021-03-26 10:42:17 -07:00
evtcache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
inval.c Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:38 -07:00
lsyscache.c Remove PF_USED_FOR_ASSERTS_ONLY from variables in general use 2021-11-30 14:02:14 +01:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
partcache.c Remove unused function parameter in get_qual_from_partbound 2021-07-14 09:52:04 -04:00
plancache.c Rename debug_invalidate_system_caches_always to debug_discard_caches. 2021-07-13 15:01:01 -04:00
relcache.c Allow specifying column list for foreign key ON DELETE SET actions 2021-12-08 11:13:57 +01:00
relfilenodemap.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
relmapper.c Another fix to relmapper race condition. 2021-06-24 11:19:03 +03:00
spccache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
syscache.c Allow publishing the tables of schema. 2021-10-27 07:44:52 +05:30
ts_cache.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
typcache.c Disable anonymous record hash support except in special cases 2021-09-08 09:55:04 +02:00