Search Postgresql Archives

Re: quirk with update a from b

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Mike G." <mike@xxxxxxxxxxxxxxxx> writes:
> UPDATE bb
> SET bb.b_col1 = aa.a_col1
> FROM aa
> WHERE bb.b_col1 <> aa.a_col1;

> Error: column "bb" of relation "bb" does not exist.

> Maybe in a future version the alias can be allowed?

No.  It's contrary to SQL spec, and if we allowed it we'd have an
ambiguity: are you assigning to field b_col1 of bb, or assigning
to field b_col1 of a composite-type field named bb in table bb?

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux