Re: Server goes to Recovery Mode when run a SQL

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Server goes to Recovery Mode when run a SQL
Дата
Msg-id 658398.1597437619@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Server goes to Recovery Mode when run a SQL  (PegoraroF10 <marcos@f10.com.br>)
Список pgsql-general
PegoraroF10 <marcos@f10.com.br> writes:
> CREATE FUNCTION public.fntextonumero(finteger public.i32, ftext text)
> RETURNS boolean
>     LANGUAGE sql STABLE
>     AS $$
>   SELECT ftext = finteger::text;
> $$;

Huh.  The crash goes away if you change that to

   SELECT finteger::text = ftext;

It looks like ExecInitSubPlan is just assuming that the outer side
of the hashable comparison condition is on the left, and this
function is confusing it by swapping that around to the right.
Kinda surprising that we never identified that problem before ---
this code's been like this for years.

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Server goes to Recovery Mode when run a SQL
Следующее
От: "Aleksey M Boltenkov"
Дата:
Сообщение: bug in psql?