Hi all,
pg_get_constraintdef() fails rather easily:
=# select pg_get_constraintdef(1);
ERROR: cache lookup failed for constraint 1
STATEMENT: select pg_get_constraintdef(1);
ERROR: XX000: cache lookup failed for constraint 1
LOCATION: pg_get_constraintdef_worker, ruleutils.c:1305
Now by looking at pg_get_constraintdef_worker()@ruleutils.c it is
commented that this error should never happen:
if (!HeapTupleIsValid(tup)) /* should not happen */
elog(ERROR, "cache lookup failed for constraint %u",
constraintId);
But it happens.
Am I missing something? Shouldn't this error be changed into something
more informative?
Regards,
--
Michael