Search Postgresql Archives

time conversion fuinctions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux