Re: infinity as a date - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: infinity as a date
Date
Msg-id 3DF73A24.2020904@mega-bucks.co.jp
Whole thread Raw
In response to infinity as a date  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
Bruno Wolff III wrote:
 >
 > Dates cannot have a value of 'infinity'. Either you can store timestamps
 > instead of dates or use another column to indicate to indicate the date
 > is infinite and have your tests check that column as well as the date
 > column.

Ok, so why does postgres let me get away with:

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

If dates cannot hvae a value of infinity why can I insert 'infinity'
into a date field?

Should not postgres throw an error?

Jc




pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: infinity as a date
Next
From: Jeff Eckermann
Date:
Subject: Re: Urgent need of (paid) PostgreSQL support in New