Adding an extra boolean column to "information_schema.columns" or "pg_attribute"
От | GPT |
---|---|
Тема | Adding an extra boolean column to "information_schema.columns" or "pg_attribute" |
Дата | |
Msg-id | CADep2PN8vide36zQe5X+kTh5BFKkCudKTOM+C_J2KUSDnN5L7Q@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Adding an extra boolean column to "information_schema.columns"or "pg_attribute"
Re: Adding an extra boolean column to "information_schema.columns" or "pg_attribute" |
Список | pgsql-general |
I would like to add an extra boolean attribute to table columns, something like NULL. Unfortunately Pg does not support such a feature: ADD ATTRIBUTE <attribute_name> TYPE <type_of_attribute> TO COLUMN <schema.table.column_name>; For example: ADD ATTRIBUTE is_displayed TYPE boolean TO COLUMN world.human.feature; so that I can write: SELECT column_name FROM information_schema.columns WHERE table_schema = world AND table_name = 'human' AND is_displayed = 'Yes'; Please let me know if there would be any failure of an internal part or other real technical problem in case I add this extra column by hand and all relevant stuffs (index, maybe constraint) to either "information_schema.columns" or "pg_attribute". I have already been suggested to use VIEW or dynamic SQL but I am looking something different. Tia
В списке pgsql-general по дате отправления: