From: | Marko Kreen <markokr(at)gmail(dot)com> |
---|---|
To: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> |
Subject: | Re: erroneous restore into pg_catalog schema |
Date: | 2013-05-14 08:49:48 |
Message-ID: | 20130514084948.GA6517@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 14, 2013 at 09:29:38AM +0200, Dimitri Fontaine wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > * Marko Kreen (markokr(at)gmail(dot)com) wrote:
> >> On Sat, May 04, 2013 at 10:57:44PM +0200, Dimitri Fontaine wrote:
> >> > Other than adminpack, I know of PGQ installing their objects in
> >> > pg_catalog. They only began doing that when switching to the CREATE
> >> > EXTENSION facility. And they set relocatable to false.
> >>
> >> FYI - PgQ and related modules install no objects into pg_catalog.
> >>
> >> I used schema='pg_catalog' because I had trouble getting schema='pgq'
> >> to work. I wanted 'pgq' schema to live and die with extension,
> >> and that was only way I got it to work on 9.1.
>
> Sorry, I didn't take the time to actually read \dx+ pgq, just remembered
> (and checked) that the control file did mention pg_catalog.
>
> There is a documented way to have the schema live and die with the
> extension), which is:
>
> relocatable = false
> schema = 'pgq'
>
> Then CREATE EXTENSION will also create the schema, that will be a member
> of the extension, and thus will get DROPed with it.
That's the problem - it's not dropped with it.
Btw, if I do "ALTER EXTENSION pgq ADD SCHEMA pgq;" during
"CREATE EXTENSION pgq FROM 'unpackaged';" then Postgres
will complain:
ERROR: cannot add schema "pgq" to extension "pgq" because the schema
contains the extension
Seems the code is pretty sure it's invalid concept...
--
marko
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2013-05-14 09:06:48 | Re: Proposal to add --single-row to psql |
Previous Message | Marti Raudsepp | 2013-05-14 08:17:13 | Re: PostgreSQL 9.3 beta breaks some extensions "make install" |