Re: TODO question

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavlo Baron <pb(at)pbit(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO question
Date: 2002-03-08 02:05:12
Message-ID: 200203080205.g2825C705090@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Good analysis. Thanks. Pavlov, I know this code is complex. I think
these tips will help.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-08 02:13:40 Re: point in time recovery and moving datafiles online
Previous Message Tom Lane 2002-03-08 02:02:35 Re: TODO question