Re: Bug in function to_char() !! - Mailing list pgsql-general

From Najib Abi Fadel
Subject Re: Bug in function to_char() !!
Date
Msg-id 006e01c463f1$8337d900$f664a8c0@najib
Whole thread Raw
In response to Bug in function to_char() !!  ("Najib Abi Fadel" <nabifadel@usj.edu.lb>)
List pgsql-general
> Bottom line: update to 7.4.  You could hack around it in 7.3 by
> explicitly promoting the date to timestamp without time zone
> (or better, make a function to_char(date) to do it for you)
> but I think your time would be better spent on an update.

Since i can't update to 7.4 (for internal reasons),
I created the following function to_char(date,text) :
CREATE function to_char(date,text) returns text as ' select
to_char($1::timestamp,$2);' language sql;

It worked well

thx
Najib.



pgsql-general by date:

Previous
From: Aaron Burghardt
Date:
Subject: Re: enable thready safety on Mac OS X 10.3.4
Next
From: Richard Huxton
Date:
Subject: Re: Windows GUI clients