Re: erroneous restore into pg_catalog schema
Marko Kreen <markokr@gmail.com>
From: Marko Kreen <markokr@gmail.com>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Erik Rijkers <er@xs4all.nl>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Kohei KaiGai <kaigai@kaigai.gr.jp>
Date: 2013-05-14T08:49:48Z
Lists: 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
Commits
-
Extend and improve use of EXTRA_REGRESS_OPTS.
- 4ae5ee6c9b4d 9.3.0 cited
-
Remove misplaced sanity check from heap_create().
- a475c6036752 9.3.0 cited
-
Silently ignore any nonexistent schemas that are listed in search_path.
- 880bfc3287dd 9.2.0 cited