Re: pg_ ?
От | A.Bhuvaneswaran |
---|---|
Тема | Re: pg_ ? |
Дата | |
Msg-id | Pine.LNX.4.44.0305061903250.1500-100000@Bhuvan.bksys.co.in обсуждение исходный текст |
Ответ на | Re: pg_ ? ("A.Bhuvaneswaran" <bhuvansql@myrealbox.com>) |
Список | pgsql-sql |
> > Witch is the system view from where i can get columns for all > > tables and views ? > > Just like when pgsql> \d view > > pg_class is the *system table* from which you can get the columns of all ^^^^^^^! > tables and views. Sorry. It is details, not columns. To get columns we can use pg_attribute system table. For example the below sql would get the column names, select c.relname, a.attname from pg_class c, pg_attribute a, pg_namespace n where c.oid = a.attrelid and a.attnum > 0 and c.relnamespace = n.oid and n.nspname = 'my_schema' and c.relname = 'my_table'; => \d pg_attribute -- for more details regards, bhuvaneswaran
В списке pgsql-sql по дате отправления: