From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow a multi-row INSERT to specify DEFAULTs for a generated col
Date: Sun, 22 Nov 2020 20:48:47 +0000
Message-ID: <E1kgwHv-0005bF-Ht@gemulon.postgresql.org> (raw)
Allow a multi-row INSERT to specify DEFAULTs for a generated column.
One can say "INSERT INTO tab(generated_col) VALUES (DEFAULT)" and not
draw an error. But the equivalent case for a multi-row VALUES list
always threw an error, even if one properly said DEFAULT in each row.
Fix that. While here, improve the test cases for nearby logic about
OVERRIDING SYSTEM/USER values.
Dean Rasheed
Discussion: https://postgr.es/m/9q0sgcr416t.fsf@gmx.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/17958972fe3bb03454a4b53756b29d65dc285efa
Modified Files
--------------
src/backend/rewrite/rewriteHandler.c | 242 ++++++++++++++++++++++++++++----
src/test/regress/expected/generated.out | 47 ++++++-
src/test/regress/expected/identity.out | 56 ++++++++
src/test/regress/sql/generated.sql | 21 ++-
src/test/regress/sql/identity.sql | 23 +++
5 files changed, 357 insertions(+), 32 deletions(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Allow a multi-row INSERT to specify DEFAULTs for a generated col
In-Reply-To: <E1kgwHv-0005bF-Ht@gemulon.postgresql.org>
References: <E1kgwHv-0005bF-Ht@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