X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 38EBBD1B503 for ; Thu, 18 Sep 2003 16:16:22 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 01075-03 for ; Thu, 18 Sep 2003 13:16:12 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5F1FCD1B4F6 for ; Thu, 18 Sep 2003 13:16:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h8IGGAiP029874; Thu, 18 Sep 2003 12:16:11 -0400 (EDT) To: Rhaoni Chiu Pereira Cc: josh@agliodbs.com, PostgreSQL ADMIN , PostgreSQL Performance Subject: Re: [PERFORM] How to force an Index ? In-reply-to: <1063896309.3f69c4f5cd16a@sistemica.info> References: <1063837067.3f68dd8b5a62b@sistemica.info> <200309171538.33515.josh@agliodbs.com> <1063896309.3f69c4f5cd16a@sistemica.info> Comments: In-reply-to Rhaoni Chiu Pereira message dated "Thu, 18 Sep 2003 11:45:09 -0300" Date: Thu, 18 Sep 2003 12:16:10 -0400 Message-ID: <29873.1063901770@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/311 X-Sequence-Number: 10399 Rhaoni Chiu Pereira writes: > I need to know if there is a way to set the to_char output to varchar instead of > text ! Why don't you change the datatype of ano_mes to text, instead? It's unlikely your application would notice the difference. (You could set a CHECK constraint on the length if you really want to duplicate the behavior of varchar(6).) Alternatively, try 7.4 beta. I believe this issue goes away in 7.4, because varchar no longer has separate comparison operators. Of course there's also the option of modifying to_char's result type in pg_proc, but I won't promise that doing so wouldn't break things. regards, tom lane