Robert Haas <robertmhaas@gmail.com> writes:
> In other words, the first paragraph is arguing for something like the
> notion of an extension template - the ability to store the extension
> files inside the server, in cases where you don't want them to appear
> in the file system. But perhaps implemented using functions rather
> than dedicated SQL syntax. But regardless of the concrete syntax, the
> first paragraph is proposing that we have something conceptually
> similar to:
> CREATE TEMPLATE yadda;
> ALTER TEMPLATE yadda ADD FILE 'yadda--1.0.sql' CONTENT $$...$$;
> Given that context, the second paragraph is intended as a suggestion
> that we should have something like pg_dump --no-templates -- which
> would still emit any CREATE EXTENSION commands, but not any
> CREATE/ALTER TEMPLATE commands - so if you relied on any templates in
> setting up the old cluster, the new cluster would need to have the
> files installed in the usual place. It was not a suggestion that we
> shoehorn the file management into CREATE / ALTER EXTENSION as you are
> proposing here; the first paragraph expresses my opinion, which hasn't
> changed between then and now, that that's a bad design.
FWIW, the more I think about it the more I like the notion of treating
"extension templates" as a separate kind of object. I do see value in
storing them inside the database system: transactional safety, the
ability to identify an owner, etc etc. But conflating this
functionality with installed extensions is just going to create
headaches.
regards, tom lane