Re: Stored procedure code no longer stored in v14 and v15, changed behaviour

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Дата
Msg-id 1579912.1669908194@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Stored procedure code no longer stored in v14 and v15, changed behaviour  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Dec 1, 2022 at 7:59 AM Martijn Tonies (Upscene Productions) <
> m.tonies@upscene.com> wrote:
>> Can you modify the server code to store the original body in proc.prosrc
>> again? It would be very helpful.

> I seem to recall that this option had been discussed and rejected when this
> feature went in.  The parsed body is a feature because its contents can be
> updated due to, e.g., renaming of objects.  The text source of the original
> command would be unable to be updated in the same way and so it is possible
> the text and the parsed contents would diverge over time, which is a
> situation we do not want to have.

Indeed.  We used to have a similar situation with respect to column
default expressions and CHECK constraint expressions.  Eventually we got
rid of the textual storage of both, because it couldn't be maintained
in a reasonable way.

I think the answer here is "don't use the new syntax if you want the
function body stored textually".  You can have one set of benefits,
or the other set, but not both at once.

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour
Следующее
От: Dominique Devienne
Дата:
Сообщение: Re: Stored procedure code no longer stored in v14 and v15, changed behaviour