Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-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

pgsql-performance by date

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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group