Re: timestamp default values

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: timestamp default values
Date: 2005-08-06 14:06:35
Message-ID: 17861.1123337195@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brendan Jurd <direvus(at)gmail(dot)com> writes:
> On 8/6/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Brendan Jurd <direvus(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-08-06 15:45:41 Re: DNS vs /etc/hosts
Previous Message John Wells 2005-08-06 13:58:07 Re: Optimizing large data loads