Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-13 Thread Jim Nasby
On 1/13/14, 5:05 PM, Peter Geoghegan wrote: On Mon, Jan 13, 2014 at 2:20 PM, Jim Nasby wrote: Well, a common case for INSERT RETURNING is to get your set of surrogate keys back; so I think users would want the ability to RETURN what finally made it into the table. Your update can also have a

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-13 Thread Peter Geoghegan
On Mon, Jan 13, 2014 at 2:20 PM, Jim Nasby wrote: > Well, a common case for INSERT RETURNING is to get your set of surrogate > keys back; so I think users would want the ability to RETURN what finally > made it into the table. Your update can also have a RETURNING clause. I'm not necessarily that

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-13 Thread Jim Nasby
On 1/12/14, 9:35 PM, Andreas Karlsson wrote: On 01/12/2014 11:20 PM, Peter Geoghegan wrote: On Sun, Jan 12, 2014 at 8:12 AM, Andreas Karlsson wrote: On 01/11/2014 11:42 PM, Peter Geoghegan wrote: I recently suggested that rather than RETURNING REJECTS, we could have a REJECTING clause, which

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Andreas Karlsson
On 01/12/2014 11:20 PM, Peter Geoghegan wrote: On Sun, Jan 12, 2014 at 8:12 AM, Andreas Karlsson wrote: On 01/11/2014 11:42 PM, Peter Geoghegan wrote: I recently suggested that rather than RETURNING REJECTS, we could have a REJECTING clause, which would see a DML statement project strictly the

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Peter Geoghegan
On Sun, Jan 12, 2014 at 8:12 AM, Andreas Karlsson wrote: > On 01/11/2014 11:42 PM, Peter Geoghegan wrote: >> I recently suggested that rather than RETURNING REJECTS, we could have >> a REJECTING clause, which would see a DML statement project strictly >> the complement of what RETURNING projects i

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Andreas Karlsson
On 01/11/2014 11:42 PM, Peter Geoghegan wrote: I recently suggested that rather than RETURNING REJECTS, we could have a REJECTING clause, which would see a DML statement project strictly the complement of what RETURNING projects in the same context. So perhaps you could also see what RETURNING wo

Re: [HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-12 Thread Craig Ringer
On 01/12/2014 06:42 AM, Peter Geoghegan wrote: > Someone suggested to me that I solicit opinion on the chosen syntax of > INSERT...ON DUPLICATE KEY LOCK FOR UPDATE on a separate thread. I'll > do that here, while also giving a formal user-level definition of the > feature. I'd like to solicit feedb

[HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-11 Thread Peter Geoghegan
Someone suggested to me that I solicit opinion on the chosen syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE on a separate thread. I'll do that here, while also giving a formal user-level definition of the feature. I'd like to solicit feedback from a wider set of people than those participating