From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: UPDATE ... SET <col> = DEFAULT |
Date: | 2003-06-23 05:22:40 |
Message-ID: | 200306230522.h5N5MeS00481@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Rod Taylor wrote:
-- Start of PGP signed section.
> Modify rewriteTargetList() to deal with a SetToDefault node
> InsertDefault renamed.
>
> Teach updateTargetListEntry() to use the columns type rather than
> calling exprType for it, since SetToDefault does not have a type but is
> stored in (TargetEntry *)->expr
>
> Remove special case in insert code. Let the default request flow
> through the same as the update case.
>
>
> On Thu, 2003-06-05 at 16:45, Tom Lane wrote:
> > Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > > It would seem a new primnode (change InsertDef into SetDefault or
> > > similar) will be required with some executor logic.
> >
> > It is not the executor's business to know about defaults. The rewriter
> > is the place where defaults get inserted - see rewriteTargetList().
> >
> > Note that default NULL will have to be treated a little differently from
> > what we do for INSERT, since the, um, default behavior of UPDATE is to
> > preserve columns rather than replace 'em with nulls.
> >
> > regards, tom lane
>
> --
> Rod Taylor <rbt(at)rbt(dot)ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc
[ Attachment, skipping... ]
-- End of PGP section, PGP failed!
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-06-23 05:59:04 | Re: Thousands of semops for every i/o |
Previous Message | Bruce Momjian | 2003-06-23 04:52:26 | Re: Runtime.SGML diff ... please expedite! |