Bug in renaming view columns

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Bug in renaming view columns
Дата
Msg-id 409F9658.7040806@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Bug in renaming view columns
Список pgsql-hackers
Hi,

Are we supposed to be able to rename view columns or not?  You can't if 
you replace the view, but you can if you rename the column.

test=# create view test as select 1 as a;
CREATE VIEW
test=# \d test      View "public.test" Column |  Type   | Modifiers
--------+---------+----------- a      | integer |
View definition: SELECT 1 AS a;

test=# create or replace view test as select 1 as b;
ERROR:  cannot change name of view column "a"
test=# alter table test rename a to b;
ALTER TABLE
test=# \d test      View "public.test" Column |  Type   | Modifiers
--------+---------+----------- b      | integer |
View definition: SELECT 1 AS b;

Chris



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CLUSTER locking
Следующее
От: Gregory Stark
Дата:
Сообщение: Linux 2.6.6 changes