]> granicus.if.org Git - postgresql/commit
Fix LATERAL references to target table of UPDATE/DELETE.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Jan 2014 20:25:19 +0000 (15:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Jan 2014 20:25:19 +0000 (15:25 -0500)
commit0a43e5466ca03fce433309c6de2a4272b79c1abb
tree1825171721464cb544277cf827fa02b6b273afb0
parent91c2755fcbd701067702cc889deeddddc6ff7a92
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.
src/backend/parser/analyze.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_relation.c
src/test/regress/expected/join.out
src/test/regress/sql/join.sql