On 7 April 2016 at 14:48, Merlin Moncure <mmonc...@gmail.com> wrote: > > On Thu, Apr 7, 2016 at 4:39 AM, postgres_sure <postgres_s...@163.com> 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. They want to add this > > feature. > > Is this syntax described in the SQL standard?
Given that the SQL standard has no concept of UPDATEs against a query with multiple tables, and that's where this could bring the most clarity, I'm not sure that it's reasonable to object on that basis. As far as I can see the SQL standard doesn't let you alias tables in an UPDATE (for the same reason, I imagine) but we allow _that_ even in a single-table UPDATE. <update statement: positioned> ::= UPDATE <table name> SET <set clause list> WHERE CURRENT OF <cursor name> Geoff -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers