From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix LATERAL references to target table of UPDATE/DELETE. |
Date: | 2014-01-07 20:25:40 |
Message-ID: | E1W0dDY-0000nk-Bf@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix LATERAL references to target table of UPDATE/DELETE.
I failed to think much about UPDATE/DELETE when implementing LATERAL :-(.
The implemented behavior ended up being that subqueries in the FROM or
USING clause (respectively) could access the update/delete target table as
though it were a lateral reference; which seems fine if they said LATERAL,
but certainly ought to draw an error if they didn't. Fix it so you get a
suitable error when you omit LATERAL. Per report from Emre Hasegeli.
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/0a43e5466ca03fce433309c6de2a4272b79c1abb
Modified Files
--------------
src/backend/parser/analyze.c | 21 +++++++++++++++
src/backend/parser/parse_clause.c | 4 +++
src/backend/parser/parse_relation.c | 4 +++
src/test/regress/expected/join.out | 48 +++++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 18 +++++++++++++
5 files changed, 95 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-01-07 21:05:53 | pgsql: Update copyright for 2014 |
Previous Message | Heikki Linnakangas | 2014-01-07 19:54:12 | pgsql: Silence compiler warning on MSVC. |