Restated in TODO:
* Allow [INSERT/UPDATE] ... RETURNING new.col or old.col (Philip)
> At 09:14 8/07/00 -0400, Bruce Momjian wrote:
> >> hi,
> >>
> >> threre are a postgresql/mysql comparative.
> >> You can get something for the TODO:
> >>
> >> http://www.phpbuilder.com/columns/tim20000705.php3?page=1
> >>
> >> regards,
> >>
> >
> >Thanks. Yes, I have added to the TODO list:
> >
> > * Add function to return primary key value on INSERT
>
> I had a look at the page and could not see the reference, so this
> suggestion may be inappropriate, but...
>
> How about something more general - an incredibly useful feature of Dec/Rdb is:
>
> insert into t1(...) values(...) returning attr-list
>
> which is like performing a select directly after the insert. The same kind
> of syntax applies to updates as well, eg.
>
> update t1 set f1 = 2 where <stuff> returning f1, f2, f3;
>
> Perhaps your original suggestion is a lot easier, but this is a convenient
> feature...
>
>
>
> ----------------------------------------------------------------
> Philip Warner | __---_____
> Albatross Consulting Pty. Ltd. |----/ - \
> (A.C.N. 008 659 498) | /(@) ______---_
> Tel: (+61) 0500 83 82 81 | _________ \
> Fax: (+61) 0500 83 82 82 | ___________ |
> Http://www.rhyme.com.au | / \|
> | --________--
> PGP key available upon request, | /
> and from pgp5.ai.mit.edu:11371 |/
>
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026