pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rhaoni Chiu Pereira <rhaoni@sistemica.info>
Cc: josh@agliodbs.com, PostgreSQL ADMIN <pgsql-admin@postgresql.org>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: [PERFORM] How to force an Index ?
Date: Thu, 18 Sep 2003 12:16:10 -0400
Message-ID: <29873.1063901770@sss.pgh.pa.us> (raw)
In-Reply-To: <1063896309.3f69c4f5cd16a@sistemica.info>
References: <1063837067.3f68dd8b5a62b@sistemica.info>
	<200309171538.33515.josh@agliodbs.com>
	<1063896309.3f69c4f5cd16a@sistemica.info>

Rhaoni Chiu Pereira <rhaoni@sistemica.info> 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



view thread (6+ messages)  latest in thread

Message-ID: <29873.1063901770@sss.pgh.pa.us>
Permalink:  ../29873.1063901770@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29873.1063901770@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rhaoni@sistemica.info, pgsql-admin@postgresql.org
  Subject: Re: [PERFORM] How to force an Index ?
  In-Reply-To: <29873.1063901770@sss.pgh.pa.us>
  References: <1063837067.3f68dd8b5a62b@sistemica.info> <200309171538.33515.josh@agliodbs.com> <1063896309.3f69c4f5cd16a@sistemica.info> <29873.1063901770@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox