On Wed, May 20, 2026 at 8:50 PM Shlok Kyal <[email protected]> wrote:
..
> Comments for 0002:
> 2. We can rename the schema pg_conflict to a different schema name.
> Is it ok to hardcode the schema name to 'pg_conflict'?
> - errmsg("cannot move objects into or out of CONFLICT
> schema")));
> + errmsg("cannot move objects into or out of
> pg_conflict schema")));
>
> Example:
> postgres=# ALTER SCHEMA pg_conflict RENAME TO sc1;
> ALTER SCHEMA
> postgres=# ALTER TABLE t2 SET SCHEMA sc1;
> ERROR: cannot move objects into or out of pg_conflict schema
>
Yikes!
I am not sure that the error message is the problem here. There are
worse things that are similar to this. e.g. I found that you can do
the same trick of renaming the 'pg_catalog' schema, and it breaks
anything that refers to that schema by name -- all the internal SQL!!
test_pub=# ALTER SCHEMA pg_catalog RENAME TO mycatalog;
ALTER SCHEMA
test_pub=# \dRp+
ERROR: relation "pg_catalog.pg_publication" does not exist
LINE 9: FROM pg_catalog.pg_publication
^
======
Kind Regards,
Peter Smith.
Fujitsu Australia