Re: unanswered: Schema Issue

Поиск
Список
Период
Сортировка
Искать
От
Joel Burton
Тема
Re: unanswered: Schema Issue
Дата
Msg-id
Pine.LNX.4.21.0104261349160.29630-100000@olympus.scw.org
Ответ на
Список
Дерево обсуждения
Re: Re: unanswered: Schema Issue "V. M." <txian@hotmail.com>
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   
Director of Information Systems, Support Center of Washington


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: RI oddness
От: Ian Lance Taylor
Дата:
Сообщение: Re: Cursor support in pl/pg
FAQ