Re: [PERFORM] How to force an Index ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rhaoni Chiu Pereira <rhaoni(at)sistemica(dot)info>
Cc: josh(at)agliodbs(dot)com, PostgreSQL ADMIN <pgsql-admin(at)postgresql(dot)org>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [PERFORM] How to force an Index ?
Date: 2003-09-18 16:16:10
Message-ID: 29873.1063901770@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

Rhaoni Chiu Pereira <rhaoni(at)sistemica(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Chris White (cjwhite) 2003-09-18 17:01:28 Re: Testing for a record before update or insert without using a function.
Previous Message Alumne FIB - GUSTAVO PEREZ QUEROL 2003-09-18 15:34:04 Re: dump among different versions of postgreSQL

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-09-18 17:27:12 Re: Many fields in one table or many tables?
Previous Message LN Cisneros 2003-09-18 14:59:54 Re: rewrite in to exists?