Re: erroneous restore into pg_catalog schema

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: erroneous restore into pg_catalog schema
Дата
Msg-id 20130514084948.GA6517@gmail.com
обсуждение исходный текст
Ответ на Re: erroneous restore into pg_catalog schema  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On Tue, May 14, 2013 at 09:29:38AM +0200, Dimitri Fontaine wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > * Marko Kreen (markokr@gmail.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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marti Raudsepp
Дата:
Сообщение: Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Proposal to add --single-row to psql