Re: Extensions versus pg_upgrade

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Extensions versus pg_upgrade
Date: 2011-02-09 18:19:59
Message-ID: 9C52C47C-EC31-4C83-B478-5ABBB5DB94B5@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Feb 8, 2011, at 6:48 PM, Tom Lane wrote:

> Like ALTER THING SET SCHEMA, ALTER THING SET EXTENSION is implicitly
> assuming that there can be only one owning extension for an object.
> Furthermore, it's not really intended for *removal* of an object from an
> extension (a concept that doesn't even exist for SET SCHEMA). We could
> take a page from COMMENT ON and use "SET EXTENSION NULL" for that, but
> that's surely more of a hack than anything else.
>
> In contrast, ALTER EXTENSION ADD doesn't presuppose that you couldn't
> add the object to multiple extensions; and it has a natural inverse,
> ALTER EXTENSION DROP. I am not necessarily suggesting that we will ever
> allow either of those things, but I do suggest that we should pick a
> syntax that doesn't look like it's being forced to conform if we ever
> want to do it. The DROP case at least seems like it might be wanted
> in the relatively near future.
>
> So that looks to me like a fairly good argument for the ADD syn

It feels a lot more natural to me, frankly. I'd tend to think about what's grouped into an extension, and look for the documentation related to extensions for how to add an object to an extension. I don't think it would occur to me, on first pass, to look in the ALTER FUNCTION docs for how to add a function to an extension.

In my mind, I'm modifying the extension, not the function.

Best,

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-09 18:29:12 Re: Sync Rep for 2011CF1
Previous Message David E. Wheeler 2011-02-09 18:09:40 Re: Sync Rep for 2011CF1