Querying information_schema [bug?]

From: Ivan Radovanovic <radovanovic(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Querying information_schema [bug?]
Date: 2012-11-23 22:09:02
Message-ID: 50AFF3FE.4030502@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2012-11-23 23:03:26 Re: obtain the difference between successive rows
Previous Message Jasen Betts 2012-11-23 22:05:38 Re: obtain the difference between successive rows