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 [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly