pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add 'missing_ok' argument to build_attrmap_by_name
Date: Tue, 29 Nov 2022 08:41:56 +0000
Message-ID: <E1ozwBf-001Gst-9S@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ad86d159b6ab90b195b06fb5c7b593900a7f9cd8

Modified Files
--------------
src/backend/access/common/attmap.c          | 14 ++++++++++----
src/backend/access/common/tupconvert.c      |  2 +-
src/backend/catalog/partition.c             |  3 ++-
src/backend/commands/indexcmds.c            |  3 ++-
src/backend/commands/tablecmds.c            | 24 ++++++++++++++++--------
src/backend/executor/execMain.c             | 11 +++++++----
src/backend/executor/execPartition.c        | 15 ++++++++++-----
src/backend/parser/parse_utilcmd.c          |  3 ++-
src/backend/replication/pgoutput/pgoutput.c |  2 +-
src/include/access/attmap.h                 |  6 ++++--
10 files changed, 55 insertions(+), 28 deletions(-)



Message-ID: <E1ozwBf-001Gst-9S@gemulon.postgresql.org>
Permalink:  ../E1ozwBf-001Gst-9S@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ozwBf-001Gst-9S@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Add 'missing_ok' argument to build_attrmap_by_name
  In-Reply-To: <E1ozwBf-001Gst-9S@gemulon.postgresql.org>
  References: <E1ozwBf-001Gst-9S@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox