looking up field names

Поиск
Список
Период
Сортировка
От terry@greatgulfhomes.com
Тема looking up field names
Дата
Msg-id 006001c229e4$b2dceae0$2766f30a@development.greatgulfhomes.com
обсуждение исходный текст
Ответы Re: looking up field names  (Robert Treat <rtreat@webmd.net>)
Список pgsql-general
I am building a custom field engine.  But I want to stop the user from
creating custom fields of the same name as a standard field in the table.

Would this suffice to find if a column already existed in a table:

SELECT  count(*)
FROM    pg_attribute, pg_class
WHERE   pg_class.relname = '<table to check>'
    AND pg_class.reltype = pg_attribute.attrelid
    AND pg_attribute.attname = '<column name to check>'

Thanks in advance

Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
terry@greatgulfhomes.com


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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: I am being interviewed by OReilly
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: 7.2.1 optimises very badly against 7.2