time conversion fuinctions

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема time conversion fuinctions
Дата
Msg-id 1160208790.4482.17.camel@zorro.isa-geek.com
обсуждение исходный текст
Ответы Re: time conversion fuinctions
Список 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 по дате отправления: