postgresql/src/backend/commands
Robert Haas cfbecf8100 Enforce child constraints during COPY TO a partitioned table.
The previous coding inadvertently checked the constraints for the
partitioned table rather than the target partition, which could
lead to data in a partition that fails to satisfy some constraint
on that partition.  This problem seems to date back to when
table partitioning was introduced; prior to that, there was only
one target table for a COPY, so the problem didn't occur, and the
code just didn't get updated.

Etsuro Fujita, reviewed by Amit Langote and Ashutosh Bapat

Discussion: https://postgr.es/message-id/5ABA4074.1090500%40lab.ntt.co.jp
2018-04-06 11:42:28 -04:00
..
aggregatecmds.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
alter.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
amcmds.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
analyze.c Improve ANALYZE's strategy for finding MCVs. 2018-03-22 09:37:36 +00:00
async.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
cluster.c Combine options for RangeVarGetRelidExtended() into a flags argument. 2018-03-30 17:05:16 -07:00
collationcmds.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
comment.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
constraint.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
conversioncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
copy.c Enforce child constraints during COPY TO a partitioned table. 2018-04-06 11:42:28 -04:00
createas.c Update copyright for 2018 2018-01-02 23:30:12 -05: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 Add prokind column, replacing proisagg and proiswindow 2018-03-02 13:48:33 -05:00
event_trigger.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
explain.c MERGE SQL Command following SQL:2016 2018-04-03 09:28:16 +01:00
extension.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
foreigncmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
functioncmds.c Fast ALTER TABLE ADD COLUMN with a non-NULL default 2018-03-28 10:43:52 +10:30
indexcmds.c Combine options for RangeVarGetRelidExtended() into a flags argument. 2018-03-30 17:05:16 -07:00
lockcmds.c Fix bug with view locking code. 2018-03-31 09:26:43 +09:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
matview.c Combine options for RangeVarGetRelidExtended() into a flags argument. 2018-03-30 17:05:16 -07:00
opclasscmds.c Support all SQL:2011 options for window frame clauses. 2018-02-07 00:06:56 -05:00
operatorcmds.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
policy.c Combine options for RangeVarGetRelidExtended() into a flags argument. 2018-03-30 17:05:16 -07:00
portalcmds.c Rename TransactionChain functions 2018-03-16 13:18:06 -04:00
prepare.c MERGE SQL Command following SQL:2016 2018-04-03 09:28:16 +01:00
proclang.c Add prokind column, replacing proisagg and proiswindow 2018-03-02 13:48:33 -05:00
publicationcmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
schemacmds.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
seclabel.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
sequence.c Combine options for RangeVarGetRelidExtended() into a flags argument. 2018-03-30 17:05:16 -07:00
statscmds.c Fix bogus Name assignment in CreateStatistics 2018-03-06 13:20:40 -03:00
subscriptioncmds.c Split the SetSubscriptionRelState function into two 2018-04-06 10:00:26 -04:00
tablecmds.c Foreign keys on partitioned tables 2018-04-04 14:02:49 -03:00
tablespace.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
trigger.c MERGE post-commit review 2018-04-05 09:54:07 +01:00
tsearchcmds.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
typecmds.c Fast ALTER TABLE ADD COLUMN with a non-NULL default 2018-03-28 10:43:52 +10:30
user.c Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
vacuum.c Sync up our various ways of estimating pg_class.reltuples. 2018-03-22 15:47:41 -04:00
vacuumlazy.c While vacuuming a large table, update upper-level FSM data every so often. 2018-03-29 11:29:54 -04:00
variable.c Update copyright for 2018 2018-01-02 23:30:12 -05:00
view.c Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00