Skip site navigation (1) Skip section navigation (2)

Re: ALTER EXTENSION UPGRADE, v3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ALTER EXTENSION UPGRADE, v3
Date: 2011-02-10 19:42:35
Message-ID: 19876.1297366955@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Feb 10, 2011 at 1:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> requires, relocatable and schema: These are problematic, because it's not
>> out of the question that someone might want to change these properties
>> from one version to another. But as things are currently set up, we must
>> know these things before we start to run the extension script, because
>> they are needed to set up the search_path correctly.

> My biggest concern with this extensions work is that these variables
> are poorly designed.

Yeah, I didn't especially like relocatable/schema either.  I thought for
awhile about redefining relocatable as a three-way switch, corresponding
to the three use cases (relocatable after the fact, relocatable only at
initial install, no relocation) but didn't pull the trigger.  It is
advantageous to have an explicit notion of a particular schema
containing the extension's exported stuff, so that we can add that
schema into the search path for dependent extensions.  That means that
you can't easily remove the explicit schema value for the third case,
so it's not that easy to make it look cleaner.

> The extension mechanism is basically the
> equivalent of RPM for inside the database.  And while in theory there
> is such a thing as a relocatable RPM, I don't know that I've ever used
> it, at least not successfully.

General opinion around Red Hat is relocatable RPMs don't work.  But
pushing a set of functions from one schema to another is a very much
narrower problem than what an RPM has to deal with, so I'm not convinced
that the analogy holds.

Now, if you want to argue that moving an extension after the fact (ALTER
EXTENSION SET SCHEMA) is so dangerous as to be useless, I wouldn't
argue very hard.  Do you want to propose ripping that out?  But
relocating at first install doesn't seem horrible.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2011-02-10 19:44:09
Subject: Re: arrays as pl/perl input arguments [PATCH]
Previous:From: David E. WheelerDate: 2011-02-10 19:38:22
Subject: Re: Range Type constructors

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group