On Wed, Dec 5, 2012 at 5:43 PM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
>> I don't find that argument convincing in the slightest. Could I perhaps
>> convince you to dig up a reference? I would be interested in the
>> arguments for that design back then.
>
> I think here it is:
>
> http://archives.postgresql.org/pgsql-hackers/2012-01/msg01307.php
Ah ha!
I had to read that twice to remember what I meant by it, so that may
be a sign that the original email wasn't any too clear. That having
been said, I think that the confusion is this: the second paragraph of
that email was intended to be interpreted *in the context* of the
proposal made in the first paragraph of the email, NOT as a separate
proposal.
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.
Ugh.
Is that any more clear than what I said before?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company