Re: Extensions support for pg_dump, patch v27

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)postgresql(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Subject: Re: Extensions support for pg_dump, patch v27
Date: 2011-01-26 20:38:48
Message-ID: 24969.1296074328@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> Mph. Although such an extension should certainly carry a dependency on
>> the schema it's using, I'm not sure that it makes sense to consider that
>> the extension (as opposed to its contained objects) belongs to the
>> schema.

> Well yes, extension are not living in a schema, we just offer users a
> way to influence the script as far as where the extension's objects are
> to be found and register a dependency so that it's easy to remember what
> the users asked. So that for example we are able to act the same way on
> pg_restore.

Oh: then you're doing it wrong. If you want to remember that WITH
SCHEMA was specified, you need to explicitly store that as another
column in pg_extension. You should not be depending on the dependency
mechanism to remember that for you, any more than we'd use pg_depend to
remember a table's relnamespace. The dependency mechanism is there
to figure out the consequences of a DROP command, it's not there to
remember arbitrary facts. (And yes, I know that we've cheated on that
principle a few times before; but you can't do it here.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-01-26 20:43:26 Re: SSI patch version 14
Previous Message Kevin Grittner 2011-01-26 20:36:25 Re: SSI patch version 14