Re: TODO question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TODO question
Date
Msg-id 26027.1015552955@sss.pgh.pa.us
Whole thread Raw
In response to Re: TODO question  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: TODO question  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Double-oops.  There is a later one under a different email subject
> called TODO questino that is a context diff.  I just need to know if
> this is the newest version and if anyone doesn't like it.

I don't like it.  As given, it inserts default values into the query
at parse time, whereas this must not be done until planning time.
(Otherwise the defaults sneak into stored rules, and if you change
defaults with ALTER TABLE you will get unexpected results.)  The
correct (and actually easier) way is to simply drop the defaulted column
out of the analyzed query altogether.

This is not Pavlo's fault exactly, since he copied the way we used
to do it in 7.1 ... but the patch must be updated to follow 7.2
practice.

Another problem: no copy/equal/outfuncs support for the added node type.

Stylistic issue: we should discourage people from putting their initials
on every bit of code they touch.  The code will soon be unreadable if
such becomes common practice.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: point in time recovery and moving datafiles online
Next
From: Bruce Momjian
Date:
Subject: Re: TODO question