Re: UPDATE ... SET = DEFAULT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UPDATE ... SET = DEFAULT
Date: 2003-06-05 20:45:47
Message-ID: 16959.1054845947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2003-06-05 20:50:20 Re: UPDATE ... SET = DEFAULT
Previous Message Dave Cramer 2003-06-05 19:33:26 cvs ETA?