pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fast default trigger and expand_tuple fixes
Date: Mon, 24 Sep 2018 20:21:04 +0000
Message-ID: <E1g4XLs-0002XK-FT@gemulon.postgresql.org> (raw)

Fast default trigger and expand_tuple fixes

Ensure that triggers get properly filled in tuples for the OLD value.
Also fix the logic of detecting missing null values. The previous logic
failed to detect a missing null column before the first missing column
with a default. Fixing this has simplified the logic a bit.

Regression tests are added to test changes. This should ensure better
coverage of expand_tuple().

Original bug reports, and some code and test scripts from Tomas Vondra

Backpatch to release 11.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7636e5c60fea83a9f3cd2ad278c0819b98941c74

Modified Files
--------------
src/backend/access/common/heaptuple.c      |  51 ++++----
src/backend/commands/trigger.c             |   5 +-
src/test/regress/expected/fast_default.out | 191 ++++++++++++++++++++++++++++-
src/test/regress/sql/fast_default.sql      | 114 ++++++++++++++++-
4 files changed, 328 insertions(+), 33 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1g4XLs-0002XK-FT@gemulon.postgresql.org>
Permalink:  ../E1g4XLs-0002XK-FT@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g4XLs-0002XK-FT@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: andrew@dunslane.net
  Subject: Re: pgsql: Fast default trigger and expand_tuple fixes
  In-Reply-To: <E1g4XLs-0002XK-FT@gemulon.postgresql.org>
  References: <E1g4XLs-0002XK-FT@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