pg_get_constraintdef failing with cache lookup error

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pg_get_constraintdef failing with cache lookup error
Дата
Msg-id CAB7nPqRKCQkAwLNtccUTUPCdUjWSSNUKnzjdi=DpgP-etJ_OmA@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_get_constraintdef failing with cache lookup error
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления: