Re: question on the information_schema

From: bricklen <bricklen(at)gmail(dot)com>
To: Salvatore Barone <salvator(dot)barone(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: question on the information_schema
Date: 2013-08-23 14:57:51
Message-ID: CAGrpgQ_YrK=nvH2d+AvbJLdd_epnNXUOvXe=6BvroHZAVkPV3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Aug 23, 2013 at 7:49 AM, Salvatore Barone <salvator(dot)barone(at)gmail(dot)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;

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David Johnston 2013-08-23 15:02:30 Re: question on the information_schema
Previous Message Salvatore Barone 2013-08-23 14:49:08 question on the information_schema