Re: existence of column name

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: existence of column name
Дата
Msg-id 49DD7179.9030100@hogranch.com
обсуждение исходный текст
Ответ на existence of column name  (Eric Smith <eric_h_smith@mac.com>)
Ответы Re: existence of column name  (Eric Smith <eric_h_smith@mac.com>)
Список pgsql-general
Eric Smith wrote:
> All,
>
> From the C API, how do I check for the existence of a column name in a
> given table?

    select data_type from information_schema.columns where
table_schema='public' and table_name='given_table' and
column_name='some_column';

that will return the data_type if the column exists, or return zero rows
if it doesn't.



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

Предыдущее
От: Eric Smith
Дата:
Сообщение: existence of column name
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: database corruption