Re: Proposal: RETURNING primary_key() - Mailing list pgsql-hackers

From Ian Barwick
Subject Re: Proposal: RETURNING primary_key()
Date
Msg-id 56DE1A16.50104@2ndquadrant.com
Whole thread Raw
In response to Proposal: RETURNING primary_key()  ("Igal @ Lucee.org" <igal@lucee.org>)
Responses Re: Proposal: RETURNING primary_key()  ("Igal @ Lucee.org" <igal@lucee.org>)
List pgsql-hackers
Hi

On 08/03/16 05:32, Igal @ Lucee.org wrote:
> THE ISSUE:
> 
> In JDBC there is a flag called RETURN_GENERATED_KEYS --
https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#RETURN_GENERATED_KEYS
> 
(...)
> THE PROPOSAL:
> 
> The proposal is to allow something like RETURNING primary_key() (it can be a keyword, not
> necessarily a function), e.g.
> 
> INSERT INTO test VALUES ('PostgresQL') RETURNING primary_key();

FYI something similar has been proposed before:
 http://www.postgresql.org/message-id/53953EFB.8070701@2ndquadrant.com

The linked thread might provide more insights into the issues surrounding
this proposal.


Regards

Ian Barwick

-- Ian Barwick                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Badly designed error reporting code in controldata_utils.c
Next
From: "Regina Obe"
Date:
Subject: Re: Is there a way around function search_path killing SQL function inlining?