postgresql/src/backend/commands
Alvaro Herrera b703b7d312
Invalidate partitions of table being attached/detached
Failing to do that, any direct inserts/updates of those partitions
would fail to enforce the correct constraint, that is, one that
considers the new partition constraint of their parent table.

Backpatch to 10.

Reported by: Hou Zhijie <houzj.fnst@fujitsu.com>
Author: Amit Langote <amitlangote09@gmail.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>

Discussion: https://postgr.es/m/OS3PR01MB5718DA1C4609A25186D1FBF194089%40OS3PR01MB5718.jpnprd01.prod.outlook.com
2021-10-18 19:08:25 -03:00
..
aggregatecmds.c Improve spelling of new FINALFUNC_MODIFY aggregate attribute. 2018-05-21 11:41:42 -04:00
alter.c Avoid duplicates in ALTER ... DEPENDS ON EXTENSION 2020-03-11 11:04:59 -03:00
amcmds.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
analyze.c Don't build extended statistics on inheritance trees 2019-07-30 19:48:26 +02:00
async.c Prevent excess SimpleLruTruncate() deletion. 2021-01-16 12:21:39 -08:00
cluster.c Fix toast rewrites in logical decoding. 2021-08-25 09:43:33 +05:30
collationcmds.c Disallow creating an ICU collation if the DB encoding won't support it. 2021-09-03 16:38:55 -04:00
comment.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
constraint.c Fix bogus CALLED_AS_TRIGGER() defenses. 2020-04-03 11:24:56 -04:00
conversioncmds.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
copy.c Fix permission checks on constraint violation errors on partitions. 2021-02-08 11:01:55 +02:00
createas.c Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
dbcommands.c Rename TransactionChain functions 2018-03-16 13:18:06 -04:00
define.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
discard.c Rename TransactionChain functions 2018-03-16 13:18:06 -04:00
dropcmds.c Revert "Forbid DROP SCHEMA on temporary namespaces" 2020-01-08 10:36:27 +09:00
event_trigger.c Fix use-after-free bug with event triggers and ALTER TABLE. 2020-10-27 15:37:13 -04:00
explain.c Fix permission checks on constraint violation errors on partitions. 2021-02-08 11:01:55 +02:00
extension.c Lock the extension during ALTER EXTENSION ADD/DROP. 2021-07-11 12:54:24 -04:00
foreigncmds.c Don't record FDW user mappings as members of extensions. 2018-08-07 16:32:55 -04:00
functioncmds.c Fix misevaluation of STABLE parameters in CALL within plpgsql. 2021-09-21 19:06:33 -04:00
indexcmds.c Remove StoreSingleInheritance reimplementation 2021-03-25 10:47:38 -03:00
lockcmds.c Revert "Accept relations of any kind in LOCK TABLE". 2020-11-06 16:17:57 -05:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
matview.c Really fix the ambiguity in REFRESH MATERIALIZED VIEW CONCURRENTLY. 2021-08-07 13:29:32 -04:00
opclasscmds.c Fix style violations in syscache lookups. 2019-05-05 13:10:07 -04:00
operatorcmds.c Make contrib modules' installation scripts more secure. 2020-08-10 10:44:43 -04:00
policy.c Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). 2021-06-25 13:59:38 -04:00
portalcmds.c Fix some anomalies with NO SCROLL cursors. 2021-09-10 13:18:32 -04:00
prepare.c Fix plancache refcount leak after error in ExecuteQuery. 2021-06-16 19:30:17 -04:00
proclang.c Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers. 2018-04-08 14:35:29 -04:00
publicationcmds.c Invalidate relcache for publications defined for all tables. 2021-09-08 11:20:42 +05:30
schemacmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
seclabel.c Check criticalSharedRelcachesBuilt in GetSharedSecurityLabel(). 2021-10-14 12:25:30 -07:00
sequence.c Revise attribute handling code on partition creation 2018-11-08 16:22:09 -03:00
statscmds.c Disallow CREATE STATISTICS on system catalogs 2021-01-15 23:33:44 +01:00
subscriptioncmds.c Don't allow to set replication slot_name as ''. 2021-07-19 11:23:35 +05:30
tablecmds.c Invalidate partitions of table being attached/detached 2021-10-18 19:08:25 -03:00
tablespace.c Fix data loss in wal_level=minimal crash recovery of CREATE TABLESPACE. 2021-08-27 23:34:22 -07:00
trigger.c Preserve firing-on state when cloning row triggers to partitions 2021-07-16 13:01:43 -04:00
tsearchcmds.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
typecmds.c Avoid scribbling on input node tree in CREATE/ALTER DOMAIN. 2021-06-18 12:09:22 -04:00
user.c Allow users with BYPASSRLS to alter their own passwords. 2020-11-03 15:41:32 -05:00
vacuum.c Prevent concurrent SimpleLruTruncate() for any given SLRU. 2020-08-15 10:15:57 -07:00
vacuumlazy.c Fix mesurement of elapsed time during truncating heap in VACUUM. 2020-02-19 20:39:02 +09:00
variable.c Fix some inappropriately-disallowed uses of ALTER ROLE/DATABASE SET. 2021-04-13 15:10:18 -04:00
view.c Fix CREATE VIEW to allow zero-column views. 2019-02-17 12:37:31 -05:00