Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-25 Thread AK
Claudio, Unfortunately, this UPDATE...FROM approach does not detect ambiguities, unless we go for tricks. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-UPDATE-with-column-list-syntax-not-implemented-tp5779600p5780215.html Sent from the PostgreSQL - hackers mai

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-22 Thread Claudio Freire
On Fri, Nov 22, 2013 at 6:36 PM, AK wrote: > Claudio, > > Can you elaborate how rules can help? Well... that specific example: > UPDATE accounts SET (contact_last_name, contact_first_name) = > (SELECT last_name, first_name FROM salesmen > WHERE salesmen.id = accounts.sales_id); Can be

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-22 Thread AK
Thank you, Tom! -- View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-UPDATE-with-column-list-syntax-not-implemented-tp5779600p5779899.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hackers mailing list (pgsql-hackers@p

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-22 Thread AK
Claudio, Can you elaborate how rules can help? -- View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-UPDATE-with-column-list-syntax-not-implemented-tp5779600p5779896.html Sent from the PostgreSQL - hackers mailing list archive at Nabble.com. -- Sent via pgsql-hacke

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-22 Thread Tom Lane
AK writes: > 9.3 documentation says: > According to the standard, the column-list syntax should allow a list of > columns to be assigned from a single row-valued expression, such as a > sub-select: > UPDATE accounts SET (contact_last_name, contact_first_name) = > (SELECT last_name, first_name

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-21 Thread Claudio Freire
On Thu, Nov 21, 2013 at 3:50 PM, David Johnston wrote: >> Why is this not implemented? Is it considered inconvenient to use, or >> difficult to implement. or not important enough, or some other reason? > > I cannot answer why but I too would like to see this. I actually asked this > a long while

Re: [HACKERS] Why is UPDATE with column-list syntax not implemented

2013-11-21 Thread David Johnston
AK wrote > 9.3 documentation says: > > According to the standard, the column-list syntax should allow a list of > columns to be assigned from a single row-valued expression, such as a > sub-select: > > UPDATE accounts SET (contact_last_name, contact_first_name) = > (SELECT last_name, first_na