Querying information_schema [bug?]

Started by Ivan Radovanovicover 13 years ago1 messagesgeneral
Jump to latest
#1Ivan Radovanovic
radovanovic@gmail.com

Hello,

I couldn't find anything mentioned about this in documentation and
googling didn't help either:
- if I connect to database as user who doesn't have permission to access
all schemas then querying information_schema.schemata returns no rows
(querying information_schema.tables returns only tables from accessible
schemas, and executing \dn from psql returns list of all schemas)

Desk=> select schema_name from information_schema.schemata;
schema_name
-------------
(0 rows)

Desk=> select distinct table_schema from information_schema.tables;
table_schema
--------------------
cards
information_schema
pg_catalog
(3 rows)

Desk=> \dn
List of schemas
Name | Owner
----------------+-------
cards | pgsql
help | pgsql
public | pgsql
storage | pgsql
(4 rows)

Desk=> select version();
version

-------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.1 on amd64-portbld-freebsd8.3, compiled by cc (GCC)
4.2.1 20070831 patched [FreeBSD], 64-bit
(1 row)

Regards,
Ivan