infinity as a date - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject infinity as a date
Date
Msg-id 3DF6E510.4090101@mega-bucks.co.jp
Whole thread Raw
Responses Re: infinity as a date  (Bruno Wolff III <bruno@wolff.to>)
Re: infinity as a date  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: Urgent need of (paid) PostgreSQL support in New
Next
From: Hadley Willan
Date:
Subject: Re: Urgent need of (paid) PostgreSQL support in New