Re: Apparent anomaly with views and unions
От | Stephan Szabo |
---|---|
Тема | Re: Apparent anomaly with views and unions |
Дата | |
Msg-id | 20050211163540.G90218@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | Apparent anomaly with views and unions ("Guy Rouillier" <guyr@masergy.com>) |
Ответы |
Re: Apparent anomaly with views and unions
|
Список | pgsql-general |
On Fri, 11 Feb 2005, Guy Rouillier wrote: > I using 8.0.1. I create 3 tables with these definitions: > > create table t1 (serv_id varchar(50) not null); > create table t2 (serv_id varchar(50) not null); > create table t3 (serv_id varchar(50) not null); > > Now I create a view like this: > > create or replace view v1 as select * from t1; > > Next, I attempt to update this view like this: > create or replace view v1 as select * from t1 union select * from t2; > > I receive: ERROR: cannot change data type of view column "serv_id" I'm pretty sure PostgreSQL treats the type of serv_id in the new view as varchar with no limit rather than varchar(50). I think that's also not entirely up to spec. In the two to three case it already was a varchar with no limit and so the type was the same.
В списке pgsql-general по дате отправления: