From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Dominique Devienne <ddevienne(at)gmail(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: UPDATE-FROM and INNER-JOIN |
Date: | 2024-08-05 13:04:48 |
Message-ID: | CAKFQuwYcFGgS9itAqsUj5Y02UtDXr8yBtac9w+v+45pLEu4U3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Monday, August 5, 2024, Dominique Devienne <ddevienne(at)gmail(dot)com> wrote:
> In https://sqlite.org/forum/forumpost/df23d80682
> Richard Hipp (Mr SQLite) shows an example of something
> that used to be supported by SQLite, but then wasn't, to be
> compatible with PostgreSQL.
>
> Thus I'm curious as to why PostgreSQL refuses the first formulation.
> Could anyone provide any insights? Thanks, --DD
>
Interesting…but not too surprising. The joining condition between the
update relation and the from relation needs to be done in the where
clause. You cannot reference columns of the update relation in the from
clause because the update relation is not named in the from clause.
There is still an underlying “why” here that I don’t know…
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-08-05 13:56:57 | Re: UPDATE-FROM and INNER-JOIN |
Previous Message | David Rowley | 2024-08-05 12:26:07 | Re: Building v17 Beta2 on Windows |