The documentation at
http://www.postgresql.org/docs/8.3/static/datatype-datetime.html seems to
say that the special value 'infinity' ("later than all other time stamps")
should work for an date-time column, and the type "date" is listed as among
the date-time data types.

 

But I can't get 'infinity' to work for columns of type "date".

 

Here's a test case:

 

CREATE TABLE _test

(

  timestampx timestamp without time zone DEFAULT 'infinity'::timestamp
without time zone,

  datex date DEFAULT 'infinity'::timestamp without time zone

)

);

 

INSERT INTO _test DEFAULT VALUES;

 

SELECT * FROM _test;

 

This returns (as viewed through pgAdmin III):

 

timestampx     datex

-----------     -----

infinity 

 

When I tried to declared the "datex" column like this:

 

  datex date DEFAULT 'infinity'::date

 

I got this:

 

ERROR:  invalid input syntax for type date: "infinity"

 

Is there any way to get 'infinity' to work for a "date" column?  

 

Or any other way to get the equivalent functionality in a date column?

 

~ TIA

~ Ken

Reply via email to