Re: pg_execute_from_file review

David Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>, Itagaki Takahiro <itagaki.takahiro@gmail.com>, Joshua Tolley <eggyknap@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-12-06T19:18:14Z
Lists: pgsql-hackers
On Dec 6, 2010, at 11:12 AM, Tom Lane wrote:

> Well, I don't put any stock in the idea that it's important for existing
> module .sql files to be usable as-is as extension definition files.  If
> it happens to fall out that way, fine, but we shouldn't give up anything
> else to get that.

I agree, but I don't think we have to lose anything.

>  Letting extension files be directly sourceable in
> psql is probably worth a bit more, but I'm not sure how much.  The
> argument that forgetting to include a magic source_path command would
> make CREATE EXTENSION behave surprisingly seems to have a good deal of
> merit though, certainly enough to justify having CREATE EXTENSION take
> care of that internally if at all possible.

Yes.

The other question I have, though, is how important is it to have extensions live in a particular schema since there seems to be no advantage to doing so. With the current patch, I can put extension "foo" in schema "bar", but I can't put any other extension named "foo" in any other schema. It's in schema "bar" but is at the same time global. That doesn't make much sense to me.

Best,

David