Re: [HACKERS] UPDATE ... SET (a, b, c) = (expr)

2009-08-21 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: So is this the right way to approach the problem, or am I missing some simpler way? See discussions of NikhilS's patch last year. I think the conclusion we had arrived at was that we should refactor the representation of SubLink so that a

[HACKERS] UPDATE ... SET (a, b, c) = (expr)

2009-08-20 Thread Alvaro Herrera
Hi, I've been having a look around to see what would it take to implement the syntax in the subject, completing a patch posted by Sussane Ebrecht two years ago. As far as I can tell, the first problem is in the grammar. The SQL spec mandates multiple value expression as a production for the

Re: [HACKERS] UPDATE ... SET (a, b, c) = (expr)

2009-08-20 Thread Alvaro Herrera
Alvaro Herrera wrote: But then there's the matter of how to represent it from the grammar inwards. At first I thought of creating a new parse node type, say MultiResTarget that would replace ResTarget in UpdateStmt, and get it from there into the optimizer and executor. Hmm, I should be

Re: [HACKERS] UPDATE ... SET (a, b, c) = (expr)

2009-08-20 Thread Nikhil Sontakke
Hi Alvaro, But then there's the matter of how to represent it from the grammar inwards.  At first I thought of creating a new parse node type, say MultiResTarget that would replace ResTarget in UpdateStmt, and get it from there into the optimizer and executor. Hmm, I should be passing it