Re: TODO question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(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:02:35
Message-ID: 26027.1015552955@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-03-08 02:05:12 Re: TODO question
Previous Message Fernando Nasser 2002-03-08 02:02:25 Re: Libpq support for precision and scale