Re: BUG #16644: null value for defaults in OLD variable for trigger
Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, fedor_erastov@mail.ru
Cc: pgsql-bugs@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2020-09-30T17:02:39Z
Lists: pgsql-bugs
On 9/29/20 10:21 PM, Tom Lane wrote: > > If you ask me, the proximate cause of this bug was the decision > to stick attrmissing info into the "constr" field of tupledescs. > That seems pretty damfool, because there are large parts of the > system that consider that the constr info is optional and can > be discarded, or never built to begin with. Perhaps it's too late > to revisit that, but we need to take a very very hard look at an > awful lot of places if we're to stick with that design. > :-( At nearly three years remove my memory is a bit hazy, but IIRC I looked at all the places (or all I could identify) where it might have mattered and it looked OK. But I'm not going to bet my life I caught everything, and maybe I unintentionally provided for a future footgun, which from your description this appears to be. I'm not sure what the implications of changing it would be. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
In INSERT/UPDATE, use the table's real tuple descriptor as target.
- 94ec005f334e 12.5 landed
- 8b39345a9d9a 14.0 landed
- 7aeb6404f0aa 13.1 landed
- 20d3fe9009dd 14.0 landed
-
Fix corner case for a BEFORE ROW UPDATE trigger returning OLD.
- de78c10072b3 12.5 landed
- d88d8ad28484 13.1 landed
- ba9f18abd365 14.0 landed
-
Use slots in trigger infrastructure, except for the actual invocation.
- ff11e7f4b9ae 12.0 cited