Re: Retrieving database schema

Поиск
Список
Период
Сортировка
От Gary M
Тема Re: Retrieving database schema
Дата
Msg-id Pine.LNX.4.44.0303222238550.26061-100000@ruby.gem
обсуждение исходный текст
Ответ на Re: Retrieving database schema  (Lamar Owen <lamar.owen@wgcr.org>)
Ответы Re: Retrieving database schema  (Lamar Owen <lamar.owen@wgcr.org>)
Список pgsql-general
Thanks, the syntax works fine on 7.3.2.

Note that "lower($table)" may not be desirable as you CAN create
mixed-case table and column names, for example...

 CREATE TABLE "MixedCase" ( "MixedCase" serial );

On Sat, 22 Mar 2003, Lamar Owen wrote:

> I use the following query, which also gives the type of the column. $table is
> the table in question.
> SELECT a.attname, t.typname
>               FROM pg_class c, pg_attribute a, pg_type t
>                         WHERE c.relname = lower($table)
>                                      and a.attnum > 0 and a.attrelid = c.oid
>                                      and a.atttypid = t.oid
> ORDER BY attname


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Retrieving database schema
Следующее
От: "Thomas T. Thai"
Дата:
Сообщение: Crash After Vacuum Analyze