Thread: System Tables
Hi Has anyone of you a good pointer to a description of where in the system tables I may find what informations? I try to code a generic procedure which gets information (like field type, field length, foreign keys...) about tables and fields from a system table. Thank you for your help in advance sj
See: http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/catalogs.html for PostgreSQL 7.2.x, for 7.3 see: http://developer.postgresql.org/docs/postgres/catalogs.html Lee. Steve Jackson writes:> Hi> > Has anyone of you a good pointer to a description of where in the system > tables I may findwhat informations? I try to code a generic procedure > which gets information (like field type, field length, foreignkeys...) > about tables and fields from a system table.> > Thank you for your help in advance
On Thu, 2002-11-28 at 02:32, Steve Jackson wrote: > Has anyone of you a good pointer to a description of where in the system > tables I may find what informations? The PostgreSQL Developer's Guide has some information: http://developer.postgresql.org/docs/postgres/catalogs.html But IIRC it might be a little out of date. Also, starting psql with "-E" and taking a look at the queries it uses to generate data is often useful. Cheers, Neil -- Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
On Thursday 28 November 2002 00:32, Steve Jackson wrote: > Hi > > Has anyone of you a good pointer to a description of where in the system > tables I may find what informations? I try to code a generic procedure > which gets information (like field type, field length, foreign keys...) > about tables and fields from a system table. > Read the man page for psql. Check out the section for PSQL META_COMMANDS. Sounds like everything you need is in there. Andy
Neil Conway <neilc@samurai.com> writes: >> Has anyone of you a good pointer to a description of where in the system >> tables I may find what informations? > The PostgreSQL Developer's Guide has some information: > http://developer.postgresql.org/docs/postgres/catalogs.html > But IIRC it might be a little out of date. One would hope not. It's taken us awhile to finish the work of documenting every system catalog, but as of 7.3 they are all in there. I intend to crack the whip as much as necessary to ensure that these docs get updated whenever someone changes the catalogs ;-) Actually, pointing people to the developer docs is more likely to create the reverse problem: what they read there may be too new for the release they are actually using. regards, tom lane