Why is pg_restore trying to create tables in pg_catalog?

From: Seamus Abshere <seamus(at)abshere(dot)net>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Why is pg_restore trying to create tables in pg_catalog?
Date: 2014-04-04 15:38:20
Message-ID: 533ED1EC.4080102@abshere.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-04-04 15:58:10 Re: Why is pg_restore trying to create tables in pg_catalog?
Previous Message Oleg Bartunov 2014-04-04 15:28:53 Re: hstore - jsonb