infinity as a date

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема infinity as a date
Дата
Msg-id 3DF6E510.4090101@mega-bucks.co.jp
обсуждение исходный текст
Ответы Re: infinity as a date  (Bruno Wolff III <bruno@wolff.to>)
Re: infinity as a date  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I see that Postgres has a special keyword "infinity" for use with
timestamps. Is there an equivalent for dates?

It seems I can set a date field to be 'infinity'::timestamp, but I can't
find a way to then query a table for fields that are 'infinity' ...

I tried the following but it doesn't quite work:

JC=# create table test(a date);
CREATE TABLE
JC=# insert into test values('infinity'::timestamp);
INSERT 1030323 1
JC=# select * from test;
  a
---

(1 row)

JC=# select * from test where a='infinity'::timestamp;
  a
---
(0 rows)


Is there a correct way to represent a date that is "later/earlier than
any other date"?

Thanks!

Jc


В списке pgsql-general по дате отправления:

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: Urgent need of (paid) PostgreSQL support in New
Следующее
От: Hadley Willan
Дата:
Сообщение: Re: Urgent need of (paid) PostgreSQL support in New