Unix Technical Forum

'infinity' in GiST index

This is a discussion on 'infinity' in GiST index within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi there, there was complain about problem with creating GiST index if timestamp column contains 'infinity' value. The problem ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:44 AM
Oleg Bartunov
 
Posts: n/a
Default 'infinity' in GiST index

Hi there,

there was complain about problem with creating GiST index if
timestamp column contains 'infinity' value. The problem is indeed
exists and I'd like to have it fixed, but we have no idea
how to handle it in GiST, actually in penalty function.
Any thoughts ?

Regards,
Oleg
__________________________________________________ ___________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:45 AM
Tom Lane
 
Posts: n/a
Default Re: 'infinity' in GiST index

Oleg Bartunov <oleg@sai.msu.su> writes:
> there was complain about problem with creating GiST index if
> timestamp column contains 'infinity' value. The problem is indeed
> exists and I'd like to have it fixed, but we have no idea
> how to handle it in GiST, actually in penalty function.
> Any thoughts ?


Seems like it's not really GiST's fault but a definitional problem
for the timestamp datatype. Specifically, what does it mean to
subtract two infinite timestamps? I find it hard to assign a
value to any of these combinations:
+infinity minus +infinity
-infinity minus -infinity
+infinity minus -infinity
-infinity minus +infinity
The first two can't really be identified with zero, and the last two are
surely not representable are they?

What's worse, a subtraction involving one infinite and one finite
timestamp *is* well defined from a mathematical point of view, eg
+infinity minus 'yesterday' = +infinity
but I doubt GiST will be happy if we make the datatype behave that
way...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com