git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 05ee328) | patch
Fix crash in error report of invalid tuple lock
Fri, 2 Aug 2013 16:49:03 +0000 (12:49 -0400)
Fri, 2 Aug 2013 17:18:37 +0000 (13:18 -0400)
commit 88c556680ca3faa40f7428c7705455d744a9859e
Fix crash in error report of invalid tuple lock

My tweak of these error messages in commit c359a1b082 contained the
thinko that a query would always have rowMarks set for a query
containing a locking clause. Not so: when declaring a cursor, for
instance, rowMarks isn't set at the point we're checking, so we'd be
dereferencing a NULL pointer.

The fix is to pass the lock strength to the function raising the error,
instead of trying to reverse-engineer it. The result not only is more
robust, but it also seems cleaner overall.

Per report from Robert Haas.
src/backend/optimizer/plan/planner.c diff | blob | blame | history
src/backend/parser/analyze.c diff | blob | blame | history
src/include/parser/analyze.h diff | blob | blame | history
src/test/regress/expected/matview.out diff | blob | blame | history
src/test/regress/expected/portals.out diff | blob | blame | history
src/test/regress/expected/union.out diff | blob | blame | history
src/test/regress/sql/matview.sql diff | blob | blame | history
src/test/regress/sql/portals.sql diff | blob | blame | history
src/test/regress/sql/union.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /