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 Berkus||Date: 2003-09-18 17:27:12|
|Subject: Re: Many fields in one table or many tables?|
|Previous:||From: LN Cisneros||Date: 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 QUEROL||Date: 2003-09-18 15:34:04|
|Subject: Re: dump among different versions of postgreSQL|