Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function
Дата
Msg-id 4079327.1699290074@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function  (Mark Hills <mark@xwax.org>)
Список pgsql-hackers
Mark Hills <mark@xwax.org> writes:
> On Fri, 3 Nov 2023, Tom Lane wrote:
>> Right, so the 910eb61b2 fix explains it.  I guess I'd better
>> expand the release note entry, because we'd not foreseen this
>> particular failure mode.

> Indeed, and curiosity got the better of me so I constructed a minimal test 
> case (see below)

I checked this against 16 branch tip (about to become 16.1),
and it works, as expected.

> I assumed I'd need at least one row of data to trigger the bug (to call on 
> a default), but that's not the case and here it is with an empty table.

Right.  The step 16.0 is taking that fails is not evaluating the
default expression, but merely prepping it for execution during COPY
startup.  This error occurs while trying to inline the inline-able
outer() function.

We worked around this by skipping the expression prep step when it's
clear from the COPY arguments that we won't need it, which should
be true for all of pg_dump's uses of COPY.

            regards, tom lane



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Wrong security context for deferred triggers?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: PoC: prefetching index leaf pages (for inserts)