From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Guy Rouillier <guyr(at)masergy(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Apparent anomaly with views and unions |
Date: | 2005-02-12 00:40:41 |
Message-ID: | 20050211163540.G90218@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-02-12 00:54:02 | Re: databases/p5-postgresql-plperl links to wrong |
Previous Message | David Parker | 2005-02-12 00:22:06 | Re: file descriptors |