Search Postgresql Archives

Need help accessing TABLES, COLUMNS, DESCRIPTIONS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I can't figure this out, and need help.

I need access (VIA SQL Statements) to retreive a list of all PUBLIC tables, columns and their descriptions.

I found:

tables
columns
pg_description

1. There is no link between the description (object ID and the tables/columns) 2. pg_descriptions seems to be in another place than tables/columns, why? (inaccessible) 3. I also need access to the user (table of users) and which tables they have access to.

Meaning, an sql statement that says:

Give me all the tables, columns and descriptions of all the PUBLIC tables a particular user has access to:

For example:

select table,table_object_id, column, column_object_Id, isColumnPrimaryKey,Column_Description
  from tables,columns,pg_descriptions
    join (tell me)
where they are 'public' tables and are accessible by user 'ReportUser'

I can do this in Sybase SQL Anywhere very easily.

I need to do it in PostGreSQL  9

Thank you.





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux