Re: Problem with schemas, possibly oids?

Luca Ferrari <[email protected]>
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <CAKoxK+5aAp9OEKbjRuaMQP65xwtg5rOpYgBYj-JLsuhLsXNfiA@mail.gmail.com>
On Thu, Aug 8, 2019 at 2:21 PM Arni <[email protected]> wrote:
> This works! I get:
>  oid  |      nspname
> -------+--------------------
>  16385 | HR16101766338-2018
> (1 row)
>
> I get the same thing if I try with '%HR16101766338-2018'. So it seems as
> if there were some characters prepended to the name... I've checked for
> spaces, but there are none. What could this mean?
>

Can you inspect output of
SELECT oid, nspname, quote_ident( nspname ) FROM pg_namespace WHERE
nspname = '%HR1610%'

and see if there's a character provoking this (could it need to be
redirect to a file and inspect with an editor).
I suspect this is the problem why your schema cannot be "named" as it is.
On a desperate approach, I would try to update pg_namespace to force
the naming of such schema, but I don't tend to work against the
catalog in production...and since you don't seem to have a backup I
would do a few more experiments first.

Luca
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.