Re: amvalidate(): cache lookup failed for operator class 123

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: amvalidate(): cache lookup failed for operator class 123
Дата
Msg-id CA+TgmoanzpfAWZDfOipThh-LtCdzROmeE5Z8BFfvy6QFntsKNw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: amvalidate(): cache lookup failed for operator class 123  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: amvalidate(): cache lookup failed for operator class 123  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Thu, May 13, 2021 at 4:49 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The main reason I'm concerned about applying that rule to amvalidate
> is that then how do you know what's actually an error case?
>
> As a hardly-irrelevant counterexample, we have a whole bunch of
> regression tests that do something like
>
> SELECT ...
> WHERE NOT amvalidate(oid);
>
> Every one of those is silently and dangerously wrong if amvalidate
> might sometimes return null.

Oh, I didn't notice previously that Justin's proposal was to make the
functions return NULL. He's correct that this is consistent with other
cases, and if we go that way, then these queries need to be updated. I
had just been imaging using ereport(ERROR, ...) which wouldn't have
that problem. I think either approach would be an improvement over the
status quo.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: compute_query_id and pg_stat_statements