From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Jochem van Dieten <jochemd(at)oli(dot)tudelft(dot)nl> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Renaming schema's |
Date: | 2002-12-02 01:19:55 |
Message-ID: | 3DEAB53B.1060502@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jochem van Dieten wrote:
> After looking at some more databases it turned out that the public
> schema always has OID 2200. I would expect pgAdminII assuming that OID
> 2200 = public schema to be the cause of this problem (I tried messing
> with ACL's to no avail and changing the name of other schema's works).
>
> So the question becomes if OID 2200 is reserved or hardcoded in the
> backend for the public schema or if this assumption from pgAdminII is
> incorrect?
>
Are you sure it isn't an issue with your search path? e.g.:
regression=# select oid,* from pg_namespace ;
oid | nspname | nspowner | nspacl
--------+------------+----------+--------
11 | pg_catalog | 1 | {=U}
99 | pg_toast | 1 | {=}
2200 | public | 1 | {=UC}
16766 | pg_temp_1 | 1 |
822259 | MySchema | 1 |
(5 rows)
regression=# \dt
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
public | foo | table | postgres
(1 row)
regression=# update pg_namespace set nspname='joe' where oid = 2200;
UPDATE 1
regression=# select oid,* from pg_namespace ;
oid | nspname | nspowner | nspacl
--------+------------+----------+--------
11 | pg_catalog | 1 | {=U}
99 | pg_toast | 1 | {=}
16766 | pg_temp_1 | 1 |
822259 | MySchema | 1 |
2200 | joe | 1 | {=UC}
(5 rows)
regression=# \dt
No relations found.
regression=# show search_path;
search_path
--------------
$user,public
(1 row)
regression=# set search_path to '$user','joe';
SET
regression=# \dt
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
joe | foo | table | postgres
(1 row)
HTH,
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-12-02 01:23:17 | Re: Renaming schema's |
Previous Message | Grand Titus | 2002-12-02 01:11:26 | Re: how to make an 'UNLOCK'? |