Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 30A2F9F9FD7 for ; Tue, 4 Sep 2007 12:03:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 08722-02 for ; Tue, 4 Sep 2007 12:03:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 931999F9F37 for ; Tue, 4 Sep 2007 12:03:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l84F381A025052; Tue, 4 Sep 2007 11:03:08 -0400 (EDT) To: Richard Broersma Jr cc: "Luiz K. Matsumura" , pgsql-sql@postgresql.org Subject: Re: Cast on character columns in views In-reply-to: <108933.2667.qm@web31807.mail.mud.yahoo.com> References: <108933.2667.qm@web31807.mail.mud.yahoo.com> Comments: In-reply-to Richard Broersma Jr message dated "Tue, 04 Sep 2007 04:08:47 -0700" Date: Tue, 04 Sep 2007 11:03:08 -0400 Message-ID: <25051.1188918188@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/36 X-Sequence-Number: 29249 Richard Broersma Jr writes: > --- "Luiz K. Matsumura" 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