Re: Cast on character columns in views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Cast on character columns in views
Date: 2007-09-04 15:03:08
Message-ID: 25051.1188918188@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Richard Broersma Jr <rabroersma(at)yahoo(dot)com> writes:
> --- "Luiz K. Matsumura" <luiz(at)planit(dot)com(dot)br> wrote:
>> But when I open a query tool window and do:
>> SELECT * FROM view1;
>> Now, again type1 column returns as bpchar.

> This might be a good question to ask on the PGAdmin mailing list or even try using the latest
> version of PGAdmin. Perhaps this is something that PGAdmin is doing rather than postgresql.

The seeming ordering dependency certainly sounds like it might be a
client-side bug --- something failing to keep straight which typmod goes
with which column, maybe?

There are some backend-side issues with simply not being able to tell
the difference between null::bpchar and null::char(3) ... but for
any given view definition, it's pretty hard to see how the order of
selecting the columns would matter. A client-side bug seems a bit
more likely.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message PostgreSQL Admin 2007-09-04 15:13:56 Trigger to change different row in same table
Previous Message Bryce Nesbitt 2007-09-04 14:40:04 Re: Partial index on boolean - Sometimes fails to index scan