postgresql/src/backend/commands
Alvaro Herrera 23cccb17fe Fix for dropped columns in a partitioned table's default partition
We forgot to map column numbers to/from the default partition for
various operations, leading to valid cases failing with spurious
errors, such as
ERROR:  attribute N of type some_partition has been dropped

It was also possible that the search for conflicting rows in the default
partition when attaching another partition would fail to detect some.
Secondarily, it was also possible that such a search should be skipped
(because the constraint was implied) but wasn't.

Fix all this by mapping column numbers when necessary.

Reported by: Daniel Wilches
Author: Amit Langote
Discussion: https://postgr.es/m/15873-8c61945d6b3ef87c@postgresql.org
2019-06-28 14:51:08 -04:00
..
Makefile Move vacuumlazy.c into access/heap. 2019-01-15 12:06:19 -08:00
aggregatecmds.c Implement OR REPLACE option for CREATE AGGREGATE. 2019-03-19 01:16:50 +00:00
alter.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
amcmds.c Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
analyze.c Update reference to sampling algorithm in analyze.c 2019-06-27 18:01:54 +02:00
async.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
cluster.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
collationcmds.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
comment.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
constraint.c Initial pgindent run for v12. 2019-05-22 12:55:34 -04:00
conversioncmds.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
copy.c Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
createas.c tableam: Rename wrapper functions to match callback names. 2019-05-23 16:32:36 -07:00
dbcommands.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
define.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
discard.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
dropcmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
event_trigger.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
explain.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
extension.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
foreigncmds.c Fix error messages 2019-05-08 13:20:16 -04:00
functioncmds.c Fix more typos and inconsistencies in the tree 2019-06-17 16:13:16 +09:00
indexcmds.c Fix use-after-free introduced in 55ed3defc9 2019-06-27 11:57:10 -04:00
lockcmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
matview.c tableam: Rename wrapper functions to match callback names. 2019-05-23 16:32:36 -07:00
opclasscmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
operatorcmds.c Fix style violations in syscache lookups. 2019-05-05 13:10:07 -04:00
policy.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
portalcmds.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
prepare.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
proclang.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
publicationcmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
schemacmds.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
seclabel.c Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
sequence.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
statscmds.c Rework the pg_statistic_ext catalog 2019-06-16 01:20:31 +02:00
subscriptioncmds.c Fix typo in message 2019-05-28 17:36:14 -04:00
tablecmds.c Fix for dropped columns in a partitioned table's default partition 2019-06-28 14:51:08 -04:00
tablespace.c Don't access catalogs to validate GUCs when not connected to a DB. 2019-06-10 23:34:50 -07:00
trigger.c tableam: Rename wrapper functions to match callback names. 2019-05-23 16:32:36 -07:00
tsearchcmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
typecmds.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
user.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
vacuum.c Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
variable.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
view.c Fix CREATE VIEW to allow zero-column views. 2019-02-17 12:37:31 -05:00