diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-08-02 12:49:03 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2013-08-02 13:37:40 -0400 |
commit | 0009462e985b90d07dc430bb3c4f1e6f57e0c318 (patch) | |
tree | 4bf50a6fa9eef45080758154bef547d05b9098d4 /src/backend/utils/adt/jsonfuncs.c | |
parent | 820739cba95622033527f60467a264db0ee91f76 (diff) | |
download | postgresql-0009462e985b90d07dc430bb3c4f1e6f57e0c318.tar.gz postgresql-0009462e985b90d07dc430bb3c4f1e6f57e0c318.zip |
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.
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions