Re: use pg_get_functiondef() in pg_dump

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: use pg_get_functiondef() in pg_dump
Дата
Msg-id CA+TgmoaXNU5tqMsq-OX5deEH9WcPgmwqx8PedY1VGMo3kadUwQ@mail.gmail.com
обсуждение исходный текст
Ответ на use pg_get_functiondef() in pg_dump  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: use pg_get_functiondef() in pg_dump  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Aug 12, 2020 at 4:25 AM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> Here is a patch to have pg_dump use pg_get_functiondef() instead of
> assembling the CREATE FUNCTION/PROCEDURE commands itself.  This should
> save on maintenance effort in the future.  It's also a prerequisite for
> being able to dump functions with SQL-standard function body discussed
> in [0].
>
> pg_get_functiondef() was meant for psql's \ef command, so its defaults
> are slightly different from what pg_dump would like, so this adds a few
> optional parameters for tweaking the behavior.  The naming of the
> parameters is up for discussion.

One problem with this, which I think Tom pointed out before, is that
it might make it to handle some forward-compatibility problems. In
other words, if something that the server is generating needs to be
modified for compatibility with a future release, it's not easy to do
that. Like if we needed to quote something we weren't previously
quoting, for example.

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Parallel query hangs after a smart shutdown is issued
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [BUG] Error in BRIN summarization