From: | "Ken Winter" <ken(at)sunward(dot)org> |
---|---|
To: | "PostgreSQL pg-general List" <pgsql-general(at)postgresql(dot)org> |
Subject: | 'Infinity' in date columns? |
Date: | 2010-05-17 03:17:34 |
Message-ID: | 37572C547879461AAF40CC2DA8773516@KenIBM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Shoaib Mir | 2010-05-17 04:18:13 | Re: 'Infinity' in date columns? |
Previous Message | Tom Lane | 2010-05-17 02:15:16 | Re: Why Performance of SQL Query is *much* Slower in GUI PgAdmin |