Add 'missing_ok' argument to build_attrmap_by_name
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 29 Nov 2022 08:39:36 +0000 (09:39 +0100)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 29 Nov 2022 08:39:36 +0000 (09:39 +0100)
commitad86d159b6ab90b195b06fb5c7b593900a7f9cd8
treeacea26f7f4dd2c3bfd2e17dea81d3bc616926594
parent00ae5d6f588e9d21fa4f4d267811f3f602fe45af
Add 'missing_ok' argument to build_attrmap_by_name

When it's given as true, return a 0 in the position of the missing
column rather than raising an error.

This is currently unused, but it allows us to reimplement column
permission checking in a subsequent commit.  It seems worth breaking
into a separate commit because it affects unrelated code.

Author: Amit Langote <amitlangote09@gmail.com>
Discussion: https://postgr.es/m/CA+HiwqFfiai=qBxPDTjaio_ZcaqUKh+FC=prESrB8ogZgFNNNQ@mail.gmail.com
src/backend/access/common/attmap.c
src/backend/access/common/tupconvert.c
src/backend/catalog/partition.c
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/backend/executor/execMain.c
src/backend/executor/execPartition.c
src/backend/parser/parse_utilcmd.c
src/backend/replication/pgoutput/pgoutput.c
src/include/access/attmap.h