pgadmin3 gets oid for schema wrong - Mailing list pgadmin-support

From Richard van den Berg
Subject pgadmin3 gets oid for schema wrong
Date
Msg-id 416F9F85.5030409@trust-factory.com
Whole thread Raw
Responses Re: pgadmin3 gets oid for schema wrong
List pgadmin-support
I have this weird problem where pgadmin3 shows empty schema's 
(tables(0), views(0), etc) while they are not empty at all. I upgraded 
to the 1.2.0-0.0+beta2.0 debian package, but the problem persists.

Refreshing the schema causes the schema to disappear from the pgadmin3 
tree. This is the query I see executed when doing the refresh:

SELECT CASE WHEN nspname LIKE 'pg\_temp\_%%' THEN 1            WHEN nsp.oid<17140 OR nspname like 'pg\_%' THEN 0
   ELSE 2 END as nsptyp,       nsp.nspname, nsp.oid, pg_get_userbyid(nspowner) AS 
 
namespaceowner, nspacl, description, has_schema_privilege(nsp.oid, 'CREATE') FROM pg_namespace nsp LEFT OUTER JOIN
pg_descriptiondes ON des.objoid=nsp.oid
 
WHERE nsp.oid=2147483647::oid
ORDER BY 1, nspname

I examined pg_namespace and the oid of the schema actually is 
2518196330. No wonder pgadmin3 thinks it's empty.

Refreshing the "schema's" tree executes this statement:

SELECT CASE WHEN nspname LIKE 'pg\_temp\_%%' THEN 1            WHEN nsp.oid<17140 OR nspname like 'pg\_%' THEN 0
   ELSE 2 END AS nsptyp,       nsp.nspname,       nsp.oid,       pg_get_userbyid(nspowner) AS namespaceowner,
nspacl,      description,       has_schema_privilege(nsp.oid, 'CREATE') FROM pg_namespace nsp LEFT OUTER JOIN
pg_descriptiondes ON des.objoid=nsp.oid
 
WHERE (nsp.nspname NOT LIKE 'pg\_%' AND nsp.nspname NOT LIKE 
'information_schema')
ORDER BY 1, nspname

The result of this query does list the schema with the correct OID 
(2518196330).

The question is: why does pgadmin3 think the oid for the schema is 
2147483647 ?

I have this problem with a bunch of schema's, which makes pgadmin3 quite 
useless for me at the moment.

Please Cc me in the discussion, as I am not on this list.

Sincerely,

-- 
Richard van den Berg, CISSP

Trust Factory B.V.      | http://www.trust-factory.com/
Bazarstraat 44a         | Phone: +31 70 3620684
NL-2518AK The Hague     | Fax  : +31 70 3603009
The Netherlands         |


pgadmin-support by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: ERROR: operator does not exist: - oid
Next
From: Andreas Pflug
Date:
Subject: Re: pgadmin3 gets oid for schema wrong