[cvsnt-dev] Re: postgres doesn't do INSERT ... RETURNS

David Somers dsomers at omz13.com
Mon Jul 24 17:16:14 UTC 2006


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


David Somers wrote:

> Tony Hoyle wrote:
>> Something like insert ... into sessionlog select
>> currval('sessionlog_id_seq')
> 
> The currval function is more for use in schema and SQL functions... and
> there's still the problem that INSERT only returns the numer of rows
> inserted rather than a field (which is what the RETURNING op does).

oops... yep, you can do it as a separate select to get the id...  its not
method that I use a lot.

I see you've committed a change... looks good... am testing now.

David.


More information about the cvsnt-dev mailing list