Re: Re: postgres TODO - Mailing list pgsql-hackers

From Philip Warner
Subject Re: Re: postgres TODO
Date
Msg-id 3.0.5.32.20000708234130.02b91690@mail.rhyme.com.au
Whole thread Raw
In response to Re: postgres TODO  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Re: postgres TODO  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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   |/


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]
Next
From: Tatsuo Ishii
Date:
Subject: Re: fcntl(SETLK) [was Re: 2nd update on TOAST]