Re: question on the information_schema - Mailing list pgsql-admin

From bricklen
Subject Re: question on the information_schema
Date
Msg-id CAGrpgQ_YrK=nvH2d+AvbJLdd_epnNXUOvXe=6BvroHZAVkPV3g@mail.gmail.com
Whole thread Raw
In response to question on the information_schema  (Salvatore Barone <salvator.barone@gmail.com>)
Responses Re: question on the information_schema
List pgsql-admin

On Fri, Aug 23, 2013 at 7:49 AM, Salvatore Barone <salvator.barone@gmail.com> wrote:
Hi all,
I created a database named "test" with the user "postgres" and I have given all privileges on database "test" to a user that I use daily, called "ssaa".
By submitting, as user "ssaa", to "test" database the «select * from information_schema.columns with where col.table_schema! = 'Pg_catalog' and col.table_schema! = 'Information_schema'» query, instead of the list of columns, I have an empty table. I have to give some special permit ssaa user?

Your query as you've written it won't return what you expect. Try the following:

select *
from information_schema.columns
where table_schema not in ('information_schema','pg_catalog')
order by 1,2,3,4;

pgsql-admin by date:

Previous
From: Salvatore Barone
Date:
Subject: question on the information_schema
Next
From: David Johnston
Date:
Subject: Re: question on the information_schema