From: | Jean-Luc Lachance <jllachan(at)nsd(dot)ca> |
---|---|
To: | SZUCS Gábor <surrano(at)mailbox(dot)hu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Fw: infinity as a date |
Date: | 2002-12-12 20:21:12 |
Message-ID: | 3DF8EFB8.4D198CDC@nsd.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
For what it is worth:
nsd=# select abstime(int4(2^31-1));
abstime
------------------------
2038-01-18 22:14:07-05
Not too far in the future.
That is also when we will have the UNIX Y2038 problem... :)
JLL
SZUCS Gábor wrote:
>
> ... Unless you have something like warranty dates which would be good to be
> able to be compared to infinity.
>
> I use a constant '3000-Jan-01' for this purpose, but probably any date in
> the next millenium will do ;) I think Tom's suggestion for MAXINT is a
> better one, except that it is yet to be implemented.
>
> But it raises several questions:
> * currently, what is MAXINT converted to date (if this conversion is
> possible at all)? i.e. what's the maximum possible date?
> * And what is the maximum finite timestamp? I assume there are not even the
> same number of digits in the year part ;)
> * Both converted to a date, would they really be equal?
> * If so, would certain finite timestamps converted to date be infinite, or
> vice versa?
>
> $0.01 :)
>
> G.
> --
> while (!asleep()) sheep++;
>
> ---------------------------- cut here ------------------------------
> ----- Original Message -----
> From: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
> Sent: Thursday, December 12, 2002 6:41 PM
>
> > Tom and Everyone,
> > Not that I feel that I get a vote, but it seems to me that an infinite
> date
> > doesn't make any sense. An interval is a measure of something (a value),
> > which could be infinite, but a date is a point in time (not a value),
> > similar to a location, and I don't think that the concept of an infinite
> > point in time makes any more sense than an infinite street address.
> > Just my $0.02.
> > Thanks,
> > Peter Darley
> >
> > -----Original Message-----
> > From: pgsql-general-owner(at)postgresql(dot)org
> > [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Tom Lane
> > Sent: Wednesday, December 11, 2002 10:35 PM
> > To: Jean-Christian Imbeault
> > Cc: pgsql-general
> > Subject: Re: [GENERAL] infinity as a date
> >
> >
> > Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> writes:
> > > As an aside, why is there a concept of an infinite timestamp but not one
> > > for date?
> >
> > Purely historical, I'd imagine. The various Postgres datatypes were
> > developed at different times by different people. Tom Lockhart perhaps
> > remembers more about this particular discrepancy.
> >
> > If you are sufficiently annoyed, please submit patches to make DATE
> > treat MAXINT and MININT as +infinity and -infinity instead of normal
> > dates. I would expect we'd accept such a patch.
> >
> > regards, tom lane
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Luc Lachance | 2002-12-12 20:23:15 | Re: Frustration with date/times/epoch in v7.3. |
Previous Message | Magnus Naeslund(f) | 2002-12-12 19:32:00 | Re: INDEX suggestion needed |