pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: fedor_erastov@mail.ru, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: BUG #16644: null value for defaults in OLD variable for trigger
Date: Sun, 25 Oct 2020 23:19:04 -0400
Message-ID: <638928.1603682344@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+HiwqFd9O=tj-r8Zpfu5NNzre_3pVC4287SA5VHLBAzx9hWVw@mail.gmail.com>
References: <16644-5da7ef98a7ac4545@postgresql.org>
	<802555.1601432494@sss.pgh.pa.us>
	<CA+HiwqH7ys=WmnbGm+wgQwt0WzvQ-R-Qn4vdE01Q_QsX7cyFsw@mail.gmail.com>
	<207142.1603468329@sss.pgh.pa.us>
	<568704.1603648770@sss.pgh.pa.us>
	<623211.1603659215@sss.pgh.pa.us>
	<CA+HiwqFd9O=tj-r8Zpfu5NNzre_3pVC4287SA5VHLBAzx9hWVw@mail.gmail.com>

Amit Langote <amitlangote09@gmail.com> writes:
> On Mon, Oct 26, 2020 at 5:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Moreover, it's more correct, even disregarding the problem
>> at hand, because the tlist isn't a perfectly accurate depiction of
>> the relation rowtype: ExecCleanTypeFromTL will not derive the correct
>> info for dropped columns.

> Hmm, I don't understand.  Isn't it the planner's job to make the
> targetlist correctly account for dropped columns; what
> expand_targetlist() does?

Yes, there are columns in the tlist to match them, but ExecCleanTypeFromTL
cannot mark those columns as "attisdropped".  The column data type
likely won't be right either.  The latter shouldn't matter, if the
column is being filled with a null ... but I'm a bit surprised that
we've gotten away this long with not being honest about attisdropped.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <638928.1603682344@sss.pgh.pa.us>
Permalink:  ../638928.1603682344@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/638928.1603682344@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, amitlangote09@gmail.com, pgsql-bugs@lists.postgresql.org, andres@anarazel.de, andrew@dunslane.net
  Subject: Re: BUG #16644: null value for defaults in OLD variable for trigger
  In-Reply-To: <638928.1603682344@sss.pgh.pa.us>

* 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