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(at)greatgulfhomes(dot)com