From: | "A(dot)Bhuvaneswaran" <bhuvansql(at)myrealbox(dot)com> |
---|---|
To: | Popeanga Marian <pmarian(at)cnlo(dot)ro> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: pg_ ? |
Date: | 2003-05-06 13:36:23 |
Message-ID: | Pine.LNX.4.44.0305061903250.1500-100000@Bhuvan.bksys.co.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | SZUCS Gabor | 2003-05-06 13:52:04 | Re: VACUUM FULL and ALTER TABLE do *nothing* in 7.3.2 |
Previous Message | A.Bhuvaneswaran | 2003-05-06 13:22:17 | Re: pg_ ? |