Re: unanswered: Schema Issue

From: "V(dot) M(dot)" <txian(at)hotmail(dot)com>
To: jburton(at)scw(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unanswered: Schema Issue
Date: 2001-04-26 18:04:14
Message-ID: F92gStMVhEUsebmspH200003861@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ok for serials, now i can extract from psql (\d tablename).

But i'm not able to extract foreign keys from the schema.

>From: Joel Burton <jburton(at)scw(dot)org>
>To: "V. M." <txian(at)hotmail(dot)com>
>CC: pgsql-hackers(at)postgresql(dot)org
>Subject: Re: unanswered: Schema Issue
>Date: Thu, 26 Apr 2001 13:51:26 -0400 (EDT)
>
>On Thu, 26 Apr 2001, V. M. wrote:
>
> >
> > I want to extract tables schema information, i've looked at
> > src/bin/psql/describe.c but i cannot determine the datatype
> > 'serial' and
> > 'references' from pg_*, i understand that triggers are generated for
> > serial
> > and references, so how i can understand from my perl application the
> > full
> > schema ?
>
>SERIALs are just integers (int4). They don't use a trigger, but use a
>sequence
>as a default value.
>
>REFERENCES are not a type of data, but a foreign key/primary key
>relationship. There's still a data type (int, text, etc.)
>
>You can derive schema info from the system catalogs. Use psql with -E for
>examples, or look in the Developer Manual.
>
>HTH,
>
>--
>Joel Burton <jburton(at)scw(dot)org>
>Director of Information Systems, Support Center of Washington
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2001-04-26 18:40:50 Re: RI oddness
Previous Message Joel Burton 2001-04-26 17:51:26 Re: unanswered: Schema Issue