Re: Bug in function to_char() !!

From: "Najib Abi Fadel" <nabifadel(at)usj(dot)edu(dot)lb>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "generalpost" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Bug in function to_char() !!
Date: 2004-07-07 07:10:36
Message-ID: 006e01c463f1$8337d900$f664a8c0@najib
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-07 07:17:21 Re: Windows GUI clients
Previous Message Marek Nowiński 2004-07-07 07:00:14 HELP