Unix Technical Forum

Re: INSERT ... RETURNING

This is a discussion on Re: INSERT ... RETURNING within the Pgsql Patches forums, part of the PostgreSQL category; --> omar@tinysofa.org writes: > Attached is a patch (by Gavin Sherry, fixed up to apply to 8.1 by me) that ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:37 AM
Tom Lane
 
Posts: n/a
Default Re: INSERT ... RETURNING

omar@tinysofa.org writes:
> Attached is a patch (by Gavin Sherry, fixed up to apply to 8.1 by me) that
> implements INSERT ... RETURNING functionality.


> It does work for the common case of RETURNING the value of a serial/sequence
> column, but gets confused when returning results out-of-order (CREATE TABLE x
> (a int, b int), INSERT ... RETURNING b, a) and doesn't let you specify the same
> column multiple times (INSERT ... RETURNING b, b). These will be addressed
> soon.


This is pretty considerably shy of what I thought had been agreed to
anyway:

- should allow expressions not only column names

- should work for UPDATE and DELETE too

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 12:38 AM
Neil Conway
 
Posts: n/a
Default Re: INSERT ... RETURNING

Tom Lane wrote:
> - should work for UPDATE and DELETE too


And probably INSERT ... SELECT as well.

-Neil

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com