Re: timestamp default values - Mailing list pgsql-general

From Tom Lane
Subject Re: timestamp default values
Date
Msg-id 17861.1123337195@sss.pgh.pa.us
Whole thread Raw
In response to timestamp default values  (Brendan Jurd <direvus@gmail.com>)
Responses Re: timestamp default values  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Brendan Jurd <direvus@gmail.com> writes:
> On 8/6/05, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Brendan Jurd <direvus@gmail.com> writes:
>>> timeofday() returns text, and moreover it returns in a bizarre format
>>> which cannot be converted directly into any useful temporal types, at
>>> least not in 8.0.2:
>>
>> Hm?  Works fine for me.  What datestyle setting do you have exactly?

> => show datestyle;
>  DateStyle
> -----------
>  ISO, DMY

Well, it works just fine here.

regression=# set datestyle = iso,dmy;
SET
regression=# select timeofday();
              timeofday
-------------------------------------
 Sat Aug 06 10:00:45.791921 2005 EDT
(1 row)

regression=# select timeofday()::timestamp;
         timeofday
----------------------------
 2005-08-06 10:00:47.920636
(1 row)

I'm testing 8.0 branch tip (or nearly so), not 8.0.2, but I don't see
any related bug fixes in the CVS logs.  And this is something that's
always worked in the past --- else we'd have been more motivated to
change timeofday()'s behavior.

Is it possible you have a broken build?  Any nondefault configure
options?

Can anyone else duplicate the problem?

            regards, tom lane

pgsql-general by date:

Previous
From: "John Wells"
Date:
Subject: Re: Optimizing large data loads
Next
From: Michael Fuhr
Date:
Subject: Re: DNS vs /etc/hosts