Re: patch: INSERT INTO t VALUES (a, b, ..., DEFAULT, ...)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Pavlo Baron <pb(at)pbit(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: INSERT INTO t VALUES (a, b, ..., DEFAULT, ...)
Date: 2002-03-08 00:57:56
Message-ID: 200203080057.g280vuT23358@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Is this ready for application? Patch is at:

http://candle.pha.pa.us/cgi-bin/pgpatches2

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

Pavlo Baron wrote:
> here is a new patch containing all changes you (Tom) suggested to make. I
> still use my "pavlo (pbpbit.org)" for me to locate my code; feel free to
> illiminate them before integrating :-)
>
> Tom Lane:
> > This would break
> > INSERT INTO foo(textcolumn) VALUES ('@default')
> > which I find hardly acceptable.
> >
> > The only way to do it without breaking valid data entries is to
> > introduce a new parse node type to represent a DEFAULT placeholder.
>
> Now there is a newly declared parse node type "Default" - the corresponding
> structure has no data. The "@default" hack is now illiminated - I'm the
> happiest about it
>
> Tom Lane:
> >
> > I also wonder what's going to happen if I write DEFAULT in a SELECT's
> > targetlist, which is possible given where you made the grammar change.
>
> The grammer now contains two new rules: "insert_target_list" and
> "insert_target_el", the SELECT and INSERT don't use the same targetlist
> anymore, but the "insert_target_el" completely inherits "target_el" to avoid
> multiple declarations and it just provides the new DEFAULT-rule.
>
> I hope, this patch is ok - to me, it looks correct now
>
> rgds
> Pavlo Baron
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
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 Bruce Momjian 2002-03-08 01:00:02 Re: [PATCHES] system catalog relation of a table and a serial
Previous Message Bruce Momjian 2002-03-08 00:55:42 Re: system catalog relation of a table and a serial sequence