Why would not use information schema to checking of existence of some column in a table: select column_name from information_schema.columns where table_name='tbl'
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных