Re: pg_get_constraintdef failing with cache lookup error

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_get_constraintdef failing with cache lookup error
Дата
Msg-id CA+Tgmoa-dG5jkWoQ3y2oeK_CfxGXfKOD4vE71iExTgTvsXLBMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_get_constraintdef failing with cache lookup error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_get_constraintdef failing with cache lookup error  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-bugs
On Mon, Apr 27, 2015 at 11:16 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
>> pg_get_constraintdef() fails rather easily:
>> =# select pg_get_constraintdef(1);
>> ERROR:  cache lookup failed for constraint 1
>
> It's expected that the caller will supply a valid pg_constraint OID.
> I don't think it's necessary to go out of our way to throw a friendlier
> error message if the OID isn't found.

It's clearly at least a bug in the comment to complain that it can't
happen if in fact it can.  But I would argue that we should never hit
an elog just because of bad user input.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Patrice Drolet
Дата:
Сообщение: Re: [SPAM] Re: BUG #13143: Cannot stop and restart a streaming server with a replication slot
Следующее
От: David Gould
Дата:
Сообщение: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated)