System Tables

Lists: pgsql-hackers
From: Steve Jackson <asdasdfwea(at)asweweasdv(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: System Tables
Date: 2002-11-28 07:32:46
Message-ID: 3de5c69d_2@news.tiscalinet.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: Steve Jackson <asdasdfwea(at)asweweasdv(dot)net>
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: System Tables
Date: 2002-11-28 18:03:26
Message-ID: 15846.23150.63277.116164@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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 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


From: Neil Conway <neilc(at)samurai(dot)com>
To: Steve Jackson <asdasdfwea(at)asweweasdv(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: System Tables
Date: 2002-11-28 18:08:47
Message-ID: 1038506927.383.17.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)samurai(dot)com> || PGP Key ID: DB3C29FC


From: "Andrew J(dot) Kopciuch" <akopciuch(at)bddf(dot)ca>
To: Steve Jackson <asdasdfwea(at)asweweasdv(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: System Tables
Date: 2002-11-28 18:17:13
Message-ID: 200211281117.13393.akopciuch@bddf.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Steve Jackson <asdasdfwea(at)asweweasdv(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: System Tables
Date: 2002-11-28 22:59:04
Message-ID: 16913.1038524344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Neil Conway <neilc(at)samurai(dot)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