postgresql/contrib/sepgsql
Tom Lane e7941a9766 Replace over-optimistic Assert in partitioning code with a runtime test.
get_partition_parent felt that it could simply Assert that systable_getnext
found a tuple.  This is unlike any other caller of that function, and it's
unsafe IMO --- in fact, the reason I noticed it was that the Assert failed.
(OK, I was working with known-inconsistent catalog contents, but I wasn't
expecting the DB to fall over quite that violently.  The behavior in a
non-assert-enabled build wouldn't be very nice, either.)  Fix it to do what
other callers do, namely an actual runtime-test-and-elog.

Also, standardize the wording of elog messages that are complaining about
unexpected failure of systable_getnext.  90% of them say "could not find
tuple for <object>", so make the remainder do likewise.  Many of the
holdouts were using the phrasing "cache lookup failed", which is outright
misleading since no catcache search is involved.
2017-06-04 16:20:03 -04:00
..
expected Fix contrib/sepgsql regression tests for partition NOT NULL change. 2017-05-21 11:46:04 -04:00
sql Fix whitespace 2017-04-10 11:18:15 -04:00
.gitignore Minor sepgsql regression test fixes. 2011-02-02 23:46:51 -05:00
Makefile Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
database.c Replace over-optimistic Assert in partitioning code with a runtime test. 2017-06-04 16:20:03 -04:00
dml.c Add partitioned table support to sepgsql 2017-04-09 14:01:58 -07:00
hooks.c Try to fix breakage of sepgsql hooks by ENR patch. 2017-04-01 00:10:12 -05:00
label.c Add partitioned table support to sepgsql 2017-04-09 14:01:58 -07:00
launcher Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
proc.c Replace over-optimistic Assert in partitioning code with a runtime test. 2017-06-04 16:20:03 -04:00
relation.c Replace over-optimistic Assert in partitioning code with a runtime test. 2017-06-04 16:20:03 -04:00
schema.c Replace over-optimistic Assert in partitioning code with a runtime test. 2017-06-04 16:20:03 -04:00
selinux.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
sepgsql-regtest.te Fix sepgsql regression tests. 2015-08-30 11:09:05 -07:00
sepgsql.h Remove unnecessary prototypes in loadable modules 2017-01-17 12:35:11 -05:00
sepgsql.sql.in sepgsql_setcon(). 2012-03-15 16:08:40 -04:00
test_sepgsql Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
uavc.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00