Re: Dumping an Extension's Script

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Andres Freund <andres@2ndquadrant.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2012-12-06T00:33:02Z
Lists: pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> In the patch we're talking about, the --extension-script is an
> accumulative option that needs an argument, so you do

>    pg_dump --extension-script istore --extension-script foo

> or if you're into short options

>    pg_dump -X istore -X foo -X bar

My reaction to this is "you've *got* to be kidding".  You're going
to put it on the user to remember which extensions are which, or
else he gets an unusable dump?  I don't think we should have a switch
like this at all.  pg_dump should do the right thing for each extension
without being told.

And, once more, I think keeping the dump behavior for extensions as-is
and inventing a different concept for the script-file-substitutes would
be better than conflating the cases.

			regards, tom lane