Folks,

While browsing through the SQL spec (200x draft), I noticed the
following:

<set clause list> (the list of SET expressions in an UPDATE statement;
section 14.12) allows a <contextually typed value specification> on the
right-hand side of SET assignments. One of the possibilities for a
<contextually typed value specification> is DEFAULT (section 6.5).

In other words, this syntax should be legal:

UPDATE sometable SET somecolumn = DEFAULT;

but it doesn't appear to be implemented as of CVS tip.

Any comments?

Cheers,

Neil


24 Mar 2003 12:17:29 -0500
Neil Conway <neilc@samurai.com>
DEFAULT in <set clause list>
> <set clause list> (the list of SET expressions in an UPDATE statement;
> section 14.12) allows a <contextually typed value specification> on the
> right-hand side of SET assignments. One of the possibilities for a
> <contextually typed value specification> is DEFAULT (section 6.5).
>
> In other words, this syntax should be legal:
>
> UPDATE sometable SET somecolumn = DEFAULT;
>
> but it doesn't appear to be implemented as of CVS tip.

Hmmm...I ran into a situation where I wanted that just the other day.
INSERT INTO...SELECT FROM kind of thing...

Chris


Tue, 25 Mar 2003 09:14:57 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: DEFAULT in <set clause list>
I'll look into it...

On Mon, 2003-03-24 at 20:14, Christopher Kings-Lynne wrote:
> > <set clause list> (the list of SET expressions in an UPDATE statement;
> > section 14.12) allows a <contextually typed value specification> on the
> > right-hand side of SET assignments. One of the possibilities for a
> > <contextually typed value specification> is DEFAULT (section 6.5).
> >
> > In other words, this syntax should be legal:
> >
> > UPDATE sometable SET somecolumn = DEFAULT;
> >
> > but it doesn't appear to be implemented as of CVS tip.
> 
> Hmmm...I ran into a situation where I wanted that just the other day.
> INSERT INTO...SELECT FROM kind of thing...
> 
> Chris
-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc
28 Mar 2003 08:23:48 -0500
Rod Taylor <rbt@rbt.ca>
Re: DEFAULT in <set clause list>

Added to TODO:

	* Allow UPDATE to use SET col = DEFAULT

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

Rod Taylor wrote:
-- Start of PGP signed section.
> I'll look into it...
> 
> On Mon, 2003-03-24 at 20:14, Christopher Kings-Lynne wrote:
> > > <set clause list> (the list of SET expressions in an UPDATE statement;
> > > section 14.12) allows a <contextually typed value specification> on the
> > > right-hand side of SET assignments. One of the possibilities for a
> > > <contextually typed value specification> is DEFAULT (section 6.5).
> > >
> > > In other words, this syntax should be legal:
> > >
> > > UPDATE sometable SET somecolumn = DEFAULT;
> > >
> > > but it doesn't appear to be implemented as of CVS tip.
> > 
> > Hmmm...I ran into a situation where I wanted that just the other day.
> > INSERT INTO...SELECT FROM kind of thing...
> > 
> > Chris
> -- 
> Rod Taylor <rbt@rbt.ca>
> 
> PGP Key: http://www.rbt.ca/rbtpub.asc
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Sun, 25 May 2003 22:56:32 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: DEFAULT in <set clause list>