Why is pg_restore trying to create tables in pg_catalog? - Mailing list pgsql-general

From Seamus Abshere
Subject Why is pg_restore trying to create tables in pg_catalog?
Date
Msg-id 533ED1EC.4080102@abshere.net
Whole thread Raw
Responses Re: Why is pg_restore trying to create tables in pg_catalog?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
hi,

Why is pg_restore trying to put stuff into the pg_catalog schema of all
places?

It's ignoring the schema specified in the pg_dump itself (`myschema`)
and even my search_path (`public`).

$ psql stuff_development --command "show search_path"
  search_path
-------------
  public
(1 row)
$ pg_restore --list stuff.pg_dump
;
; Archive created at Fri Apr  4 00:55:50 2014
;     dbname: stuff_development
;     TOC Entries: 14
;     Compression: -1
;     Dump Version: 1.12-0
;     Format: CUSTOM
;     Integer: 4 bytes
;     Offset: 8 bytes
;     Dumped from database version: 9.3.4
;     Dumped by pg_dump version: 9.3.4
;
;
; Selected TOC Entries:
;
205; 1259 95675 TABLE myschema stuff_one myuser
[...]
3312; 0 95675 TABLE DATA myschema stuff_one myuser
[...]
$ pg_restore --verbose --no-owner --no-privileges --dbname
stuff_development stuff.pg_dump
pg_restore: connecting to database for restore
pg_restore: creating TABLE stuff_one
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 205; 1259 95675 TABLE
stuff_one myuser
pg_restore: [archiver (db)] could not execute query: ERROR:  permission
denied to create "pg_catalog.stuff_one"
DETAIL:  System catalog modifications are currently disallowed.
     Command was: CREATE TABLE stuff_one (
     the_geom public.geometry
);

Thank you!
Seamus

--
Seamus Abshere, SCEA
https://github.com/seamusabshere


pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: hstore - jsonb
Next
From: Emmanuel Medernach
Date:
Subject: UDF calls and FDW