Re: 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: Re: Why is pg_restore trying to create tables in pg_catalog?
Date: 2014-04-04 17:49:30
Message-ID: 533EF0AA.1090609@abshere.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/4/14, 12:58 PM, Tom Lane wrote:
> Seamus Abshere <seamus(at)abshere(dot)net> writes:
>> Why is pg_restore trying to put stuff into the pg_catalog schema of all places?
>
> Hm ... does myschema actually exist in the target database? [...] if myschema doesn't exist, the creation target devolves to pg_catalog. This is not terribly elegant but I'm not sure if there's consensus to change it.

Tom,

You're right, myschema didn't exist (I thought I had created it
separately, etc.)

Perhaps it would be good to warn the user (at least in --verbose) if
it's auto-devolving to pg_catalog?

Thanks again,
Seamus

PS. Otherwise, if you google the error message, you get a whole bunch of
stackoverflow posts recommending you make your user a superuser so you
can write to pg_catalog, which probably isn't what the person wanted in
the first place.

--
Seamus Abshere, SCEA
+598 99 54 99 54
https://github.com/seamusabshere

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-04-04 18:02:09 Re: Why is pg_restore trying to create tables in pg_catalog?
Previous Message John R Pierce 2014-04-04 17:49:12 Re: SSD Drives