Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Tom Lane
"postgres_sure" writes: > I found "Do not include the table's name in the specification of a target > column > — for example, UPDATE tab SET tab.col = 1 is invalid." in > the documentation. > Some people usually like to update table by alias. They want to add this > feature.

Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Geoff Winkless
On 7 April 2016 at 16:45, Tom Lane wrote: > Don't know which version of the SQL spec you're looking at, It was the draft 95 version, cos (being text file) it's easiest to read :). I'll learn my lesson next time and expand the 2008 one. > but SQL:2008 has > > ::= > UPDATE [ [ AS ] ] >

Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Tom Lane
Geoff Winkless writes: > I grabbed the wrong section of the doc; I should of course have pasted > the searched version: > ::= > UPDATE > SET > [ WHERE ] > My point is still the same though :) Don't know which version of the SQL spec you're looki

Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Geoff Winkless
On 7 April 2016 at 15:51, I wrote: > ::= > UPDATE > SET > WHERE CURRENT OF I grabbed the wrong section of the doc; I should of course have pasted the searched version: ::= UPDATE SET [ WHERE ] M

Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Geoff Winkless
On 7 April 2016 at 14:48, Merlin Moncure wrote: > > On Thu, Apr 7, 2016 at 4:39 AM, postgres_sure wrote: > > Hi, > > > > I found "Do not include the table's name in the specification of a target > > column > > — for example, UPDATE tab SET tab.col = 1 is invalid." in > > the docu

Re: [HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread Merlin Moncure
On Thu, Apr 7, 2016 at 4:39 AM, postgres_sure wrote: > Hi, > > I found "Do not include the table's name in the specification of a target > column > — for example, UPDATE tab SET tab.col = 1 is invalid." in > the documentation. > > Some people usually like to update table by alias.

[HACKERS] Why the "UPDATE tab SET tab.col" is invalid?

2016-04-07 Thread postgres_sure
Hi, I found "Do not include the table's name in the specification of a target column — for example, UPDATE tab SET tab.col = 1 is invalid." in the documentation. Some people usually like to update table by alias. They want to add this feature. So I get the source in the gram.y