time conversion fuinctions - Mailing list pgsql-general

From Rafal Pietrak
Subject time conversion fuinctions
Date
Msg-id 1160208790.4482.17.camel@zorro.isa-geek.com
Whole thread Raw
Responses Re: time conversion fuinctions
List pgsql-general
Hi All,

Is this the expected result?

The question particularly apply to the last SELECT. I'd expected it to
return boolean value just like in the second example below. It returns
nothing instead, and does not rise an error either. Is this the correct
behavior?

But also, is it correct for a function date(timestamp) to return one row
of *nothing*?

----------------postgres v8.1.4----------------------------
# SELECT timestamp 'today';
      timestamp
---------------------
 2006-10-07 00:00:00
(1 row)

# SELECT date(timestamp 'today') <> date(timestamp 'yesterday');
 ?column?
----------
 t
(1 row)

# SELECT timestamp 'infinity';
 timestamp
-----------
 infinity
(1 row)

# SELECT timestamp '-infinity';
 timestamp
-----------
 -infinity
(1 row)

# SELECT date(timestamp 'infinity');
 date
------

(1 row)

# SELECT date(timestamp '-infinity');
 date
------

(1 row)

# SELECT date(timestamp '-infinity') <> date(timestamp 'infinity');
 ?column?
----------

(1 row)
---------------------END----------------------



--
-R

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: ISO week dates
Next
From: Emanuele Rocca
Date:
Subject: Re: URGENT - startup process (PID 29541) was terminated by signal 6