Re: quirk with update a from b - Mailing list pgsql-general

From Tom Lane
Subject Re: quirk with update a from b
Date
Msg-id 19858.1143062385@sss.pgh.pa.us
Whole thread Raw
In response to quirk with update a from b  ("Mike G." <mike@thegodshalls.com>)
List pgsql-general
"Mike G." <mike@thegodshalls.com> 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

pgsql-general by date:

Previous
From: "Alex bahdushka"
Date:
Subject: Re: PANIC: heap_update_redo: no block
Next
From: Tony Caduto
Date:
Subject: Re: question about the admin contrib module and binary