Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8FD749F9B1A for ; Tue, 4 Sep 2007 08:08:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 61396-06 for ; Tue, 4 Sep 2007 08:08:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web31807.mail.mud.yahoo.com (web31807.mail.mud.yahoo.com [68.142.207.70]) by postgresql.org (Postfix) with SMTP id 59C709F9730 for ; Tue, 4 Sep 2007 08:08:49 -0300 (ADT) Received: (qmail 2675 invoked by uid 60001); 4 Sep 2007 11:08:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=NGlkBPI3y07kybyFnAMaDoT1MTimwrxm/lK73/3NlCrnKWYmXATWGCM5sHnBTXNrcu48X4M0Wc7JyvjAsi6xQ4dlmjQN+riv2rAbHFV2Npxwh2mtiXkg5PiD5IOiwoAtPoFDUvzADsY1GLETPzWYws7jSXJneOERy0qBDm5jrhw=; X-YMail-OSG: pbEGCPkVM1ncJ29DnJKM1IHKse57pRpGdScQZikXgFzygAjA20m1dbGu8gjbgM3Q3Ej4yA-- Received: from [75.84.89.248] by web31807.mail.mud.yahoo.com via HTTP; Tue, 04 Sep 2007 04:08:47 PDT Date: Tue, 4 Sep 2007 04:08:47 -0700 (PDT) From: Richard Broersma Jr Subject: Re: Cast on character columns in views To: "Luiz K. Matsumura" , pgsql-sql@postgresql.org In-Reply-To: <46DD0A5E.9010400@planit.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <108933.2667.qm@web31807.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.117 tagged_above=0 required=5 tests=AWL=0.857, BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200709/32 X-Sequence-Number: 29245 --- "Luiz K. Matsumura" wrote: > Ugh, I'm totally crazy with this views > I'm using pgadmin with postgres, when I clink on "view the data of > selected object" button all works fine. > But when I open a query tool window and do: > > SELECT * FROM view1; > Now, again type1 column returns as bpchar. > But if I do: 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. If you open psql -U your_db_user -d your_database_name. and type: \d schema_name.view_name was does it show as the definition of the column. Regards, Richard Broersma Jr.