Обсуждение: Is there a good reason we don't have INTERVAL 'infinity'?

Поиск
Список
Период
Сортировка

Is there a good reason we don't have INTERVAL 'infinity'?

От
Josh Berkus
Дата:
Hackers,

Is there a reason why INTERVAL 'infinity' is not implemented?  That is,
an interval which is larger than all defined intervals, and which added
to any timestamp turns it into 'infinity'.

Or is it just Round TUITs?

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


Re: Is there a good reason we don't have INTERVAL 'infinity'?

От
Brar Piening
Дата:
<br /><span id="IDstID">Josh Berkus wrote:</span><blockquote cite="mid:4EB095C8.1050703@agliodbs.com" type="cite"><pre
wrap="">Hackers,

Is there a reason why INTERVAL 'infinity' is not implemented?  That is,
an interval which is larger than all defined intervals, and which added
to any timestamp turns it into 'infinity'.

Or is it just Round TUITs?</pre></blockquote><br /> Probably the latter.<br /> There is even a function <tt
class="LITERAL"><codeclass="FUNCTION">isfinite(<tt class="TYPE">interval</tt>)</code></tt> which doesn't seem to do
anythinguseful.<br /> See complaint in <a class="moz-txt-link-freetext"
href="http://archives.postgresql.org/message-id/200101241913.f0OJDUu45423@hub.org">http://archives.postgresql.org/message-id/200101241913.f0OJDUu45423@hub.org</a><br
/>Although the operation used in this complaint isn't obviously defined there certainly are operations that are defined
likeinfinity + infinity = infinity.<br /> See <a class="moz-txt-link-freetext"
href="http://de.wikipedia.org/wiki/Unendlichkeit#Analysis">http://de.wikipedia.org/wiki/Unendlichkeit#Analysis</a><br/>
(Sorryfor linking the german wikipedia - the english text is ways less verbose on this.)<br /><br /> Regards,<br /><br
/>Brar<br /> 

Re: Is there a good reason we don't have INTERVAL 'infinity'?

От
kris@shannon.id.au
Дата:
On 2 November 2011 16:35, Brar Piening <brar@gmx.de> wrote:
> See http://de.wikipedia.org/wiki/Unendlichkeit#Analysis
> (Sorry for linking the german wikipedia - the english text is ways less
> verbose on this.)

Google Translate has come a very long way.

I can read that whole section easily with my brain automatically
fixing up the few grammatical errors that Google doesn't get
quite right.


Re: Is there a good reason we don't have INTERVAL 'infinity'?

От
Bruce Momjian
Дата:
Brar Piening wrote:
> 
> Josh Berkus wrote:
> > Hackers,
> >
> > Is there a reason why INTERVAL 'infinity' is not implemented?  That is,
> > an interval which is larger than all defined intervals, and which added
> > to any timestamp turns it into 'infinity'.
> >
> > Or is it just Round TUITs?
> 
> Probably the latter.
> There is even a function |isfinite(interval)| which doesn't seem to do 
> anything useful.
> See complaint in 
> http://archives.postgresql.org/message-id/200101241913.f0OJDUu45423@hub.org
> Although the operation used in this complaint isn't obviously defined 
> there certainly are operations that are defined like infinity + infinity 
> = infinity.
> See http://de.wikipedia.org/wiki/Unendlichkeit#Analysis
> (Sorry for linking the german wikipedia - the english text is ways less 
> verbose on this.)

TODO has:
Allow infinite intervals just like infinite timestamps 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +