postgresql/src/backend/commands
Amit Kapila 13a185f54b Allow publications with schema and table of the same schema.
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
2022-09-23 08:21:26 +05:30
..
Makefile Move parallel vacuum code to vacuumparallel.c. 2021-12-23 11:42:52 +05:30
aggregatecmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
alter.c Ensure that pg_auth_members.grantor is always valid. 2022-08-18 13:13:02 -04:00
amcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
analyze.c Invent qsort_interruptible(). 2022-07-12 16:30:36 -04:00
async.c Revert the addition of GetMaxBackends() and related stuff. 2022-04-12 14:45:23 -04:00
cluster.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
collationcmds.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
comment.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
constraint.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
conversioncmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
copy.c Reject MERGE in CTEs and COPY 2022-08-12 12:05:50 +02:00
copyfrom.c Fix thinko in comment. 2022-09-22 15:55:00 +09:00
copyfromparse.c Fix typo in comment. 2022-08-26 16:55:00 +09:00
copyto.c Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
createas.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
dbcommands.c Improve ICU option handling in CREATE DATABASE 2022-09-21 10:41:36 -04:00
define.c Improve two comments related to a boolean DefElem's value 2022-07-11 11:07:33 +09:00
discard.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dropcmds.c Use list_copy_head() instead of list_truncate(list_copy(...), ...) 2022-07-13 15:03:47 +12:00
event_trigger.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
explain.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
extension.c Fix missed corner cases for grantable permissions on GUCs. 2022-07-19 17:21:55 -04:00
foreigncmds.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
functioncmds.c More -Wshadow=compatible-local warning fixes 2022-08-26 02:35:40 +12:00
indexcmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
lockcmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
matview.c Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
opclasscmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
operatorcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
policy.c Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
portalcmds.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
prepare.c Assorted examples of expanded type-safer palloc/pg_malloc API 2022-09-12 08:45:03 +02:00
proclang.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
publicationcmds.c Allow publications with schema and table of the same schema. 2022-09-23 08:21:26 +05:30
schemacmds.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
seclabel.c Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
sequence.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00
statscmds.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
subscriptioncmds.c Message wording improvements 2022-09-16 16:39:26 +02:00
tablecmds.c Allow publications with schema and table of the same schema. 2022-09-23 08:21:26 +05:30
tablespace.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
trigger.c Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
tsearchcmds.c Add Boolean node 2022-01-17 10:38:23 +01:00
typecmds.c Avoid using list_length() to test for empty list. 2022-08-17 11:12:35 -04:00
user.c Allow grant-level control of role inheritance behavior. 2022-08-25 10:06:02 -04:00
vacuum.c Derive freeze cutoff from nextXID, not OldestXmin. 2022-08-31 11:37:35 -07:00
vacuumparallel.c Use logical operator && instead of & in vacuumparallel.c. 2022-08-22 08:53:58 +05:30
variable.c Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
view.c In extensions, don't replace objects not belonging to the extension. 2022-08-08 11:12:31 -04:00