Re: pg_dump new feature: exporting functions only. Bad or good idea ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Date
Msg-id 3523389.1616001383@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump new feature: exporting functions only. Bad or good idea ?  (Vik Fearing <vik@postgresfriends.org>)
Responses Re: pg_dump new feature: exporting functions only. Bad or good idea ?  (Lætitia Avrot <laetitia.avrot@gmail.com>)
List pgsql-hackers
Vik Fearing <vik@postgresfriends.org> writes:
> On 3/17/21 6:00 PM, Lætitia Avrot wrote:
>> However, when I finally got the time to look at it in detail, I found out
>> there was no way to solve the dependencies in the functions and procedures,
>> so that the exported file, when re-played could lead to invalid objects.
>>  ...
>> So, my question is: what do you think about such a feature? is it worth it?

> Yes, it is absolutely worth it to be able to extract just the functions
> from a database.  I have wanted this several times.

Selective dumps always have a risk of not being restorable on their
own; I don't see that "functions only" is noticeably less safe than
"just these tables", or other cases that we support already.

What I'm wondering about is how this might interact with the
discussion at [1].

            regards, tom lane

[1] https://www.postgresql.org/message-id/flat/CAFj8pRB10wvW0CC9Xq=1XDs=zCQxer3cbLcNZa+qiX4cUH-G_A@mail.gmail.com



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Next
From: Tomas Vondra
Date:
Subject: Re: PoC/WIP: Extended statistics on expressions