Skip site navigation (1) Skip section navigation (2)

altering the name of the public schema

From: Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl>
To: pgadmin-support(at)postgresql(dot)org
Subject: altering the name of the public schema
Date: 2002-12-02 01:47:47
Message-ID: 3DEABBC3.9090000@oli.tudelft.nl (view raw or flat)
Thread:
Lists: pgadmin-support
[restarting the "Renaming schema's" thread from pgsql-general]

Using pgAdminII version 1.4.2 with PostgreSQL 7.3

I can alter the name of a schema using:
test=# update pg_catalog.pg_namespace
test-#     set nspname = 'newname'
test-#     where nspname = 'oldname';

This works without a problem until I try to rename the public schema. 
For some reason this schema doesn't list among the schema's in a 
database anymore. Changing the name back to public will make it list 
again. But, even when it is not visible I can perform queries on it. 
psql does not have any problems.

If I just add another entry into the pg_namespace table using an insert 
query it will show straight away as a schema in pgAdminII. So I presume 
the issue lies in the one thing I can't control in the pg_namespace 
table; the OID.
Could it be that somewhere in pgAdminII there is a reference to the OID 
2200 that is assigned to the public schema by default?

Jochem


pgadmin-support by date

Next:From: Dave PageDate: 2002-12-02 08:09:38
Subject: Re: altering the name of the public schema
Previous:From: pippoDate: 2002-12-01 21:14:42
Subject: kinda weird

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group