From: | Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk> |
---|---|
To: | Marzullo Laurent <Laurent(dot)Marzullo(at)sema(dot)be>, PGSQL General list <pgsql-general(at)postgreSQL(dot)org> |
Subject: | Re: [GENERAL] Prog to generate table structure ... |
Date: | 1999-08-31 11:15:35 |
Message-ID: | v04020a00b3f167fc3a7c@[128.40.242.190] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
don't know about any facilities to generate C files describing table
structure.
As to obtaining that information, I would say it is all in system catalog
tables (i.e. the tables that start with pg_ and which can be listed with
\dS in psql).
These are the tables that are queried when you use such psql commands as
\dt, \di or \d *.
There is information on these tables (along with an ER diagram ) in the PG
manuals.
try http://www.postgresql.org/docs/postgres/extend15617.htm
also, in my verison of PG (v.6.4.0) there is a file in the source code that
gives good examples of queries exploiting system catalogues.
It can be found at <postgresql-src-dir>/src/tutorial/syscat.source.
I don't know where/if that file exists in PG 6.5.* but I would guess in a
similar place.
let me know if you can't find it and I'll send you a copy if you want.
bonne chance,
S.
At 12:45 pm +0200 31/8/99, Marzullo Laurent wrote:
>Hello,
>
>is there a prog to generate C file describing table structure
>of a database.
>
>(Something like dclgen under Ingres...)
>
>If not, I would like to know how to get information about
>type of each row of a table to write this kind of prog.
>(i.e. Where is this explain ?)
>
>--
>+----------------------------------+
>| Marzullo Laurent |
>| Analyste-programmeur |
>| SEMA-GROUP Belgium S.A. |
>| Tél: (32) 2 333 52 43 |
>| e-mail: Laurent(dot)Marzullo(at)sema(dot)be |
>+----------------------------------+
>
>************
+--------------------------+--------------------------------------+
| Stuart C. G. Rison | Ludwig Institute for Cancer Research |
+--------------------------+ 91 Riding House Street |
| N.B. new phone code!! | London, W1P 8BT |
| Tel. +44 (0)207 878 4041 | UNITED KINGDOM |
| Fax. +44 (0)207 878 4040 | stuart(at)ludwig(dot)ucl(dot)ac(dot)uk |
+--------------------------+--------------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | José Soares | 1999-08-31 12:10:42 | Re: [GENERAL] Referential integrity |
Previous Message | Marzullo Laurent | 1999-08-31 10:45:29 | Prog to generate table structure ... |