https://github.com/postgres/postgres
Revision b7256753ec251fd6a1f6bd205dbe62ccbb3261c4 authored by Amit Kapila on 23 September 2022, 02:38:24 UTC, committed by Amit Kapila on 23 September 2022, 02:38:24 UTC
We previously thought that allowing such cases can confuse users when they
specify DROP TABLES IN SCHEMA but that doesn't seem to be the case based
on discussion. This helps to uplift the restriction during
ALTER TABLE ... SET SCHEMA which used to ensure that we couldn't end up
with a publication having both a schema and the same schema's table.

To allow this, we need to forbid having any schema on a publication if
column lists on a table are specified (and vice versa). This is because
otherwise we still need a restriction during ALTER TABLE ... SET SCHEMA to
forbid cases where it could lead to a publication having both a schema and
the same schema's table with column list.

Based on suggestions by Peter Eisentraut.

Author: Hou Zhijie and Vignesh C
Reviewed-By: Peter Smith, Amit Kapila
Backpatch-through: 15, where it was introduced
Discussion: https://postgr.es/m/2729c9e2-9aac-8cda-f2f4-34f2bcc18f4e@enterprisedb.com
1 parent dd6070b
History
Tip revision: b7256753ec251fd6a1f6bd205dbe62ccbb3261c4 authored by Amit Kapila on 23 September 2022, 02:38:24 UTC
Allow publications with schema and table of the same schema.
Tip revision: b725675
File Mode Size
config
contrib
doc
src
.cirrus.yml -rw-r--r-- 18.2 KB
.dir-locals.el -rw-r--r-- 730 bytes
.editorconfig -rw-r--r-- 183 bytes
.git-blame-ignore-revs -rw-r--r-- 9.5 KB
.gitattributes -rw-r--r-- 1.4 KB
.gitignore -rw-r--r-- 504 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 4.1 KB
HISTORY -rw-r--r-- 277 bytes
Makefile -rw-r--r-- 1.8 KB
README -rw-r--r-- 1.2 KB
README.git -rw-r--r-- 721 bytes
aclocal.m4 -rw-r--r-- 397 bytes
configure -rwxr-xr-x 584.4 KB
configure.ac -rw-r--r-- 87.0 KB

README

back to top