From: | Andreas Joseph Krogh <andreak(at)officenet(dot)no> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why is NULL = unbounded for rangetypes? |
Date: | 2013-08-30 09:22:56 |
Message-ID: | OrigoEmail.4d.7156e1fda9bbc0ec.140ce84e50d@prod2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
<div>På fredag 30. august 2013 kl. 03:23:09, skrev Jeff Davis <<a href="mailto:pgsql(at)j-davis(dot)com" target="_blank">pgsql(at)j-davis(dot)com</a>>:</div>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="display:inline; font-family: monospace; font-size: 12px;">On Tue, 2013-07-09 at 10:45 +0200, Andreas Joseph Krogh wrote:<br>
> I would expect the queries above to return FALSE and have to use<br>
> INFINITY to have them return TRUE. I don't understand what you mean by<br>
> ranges not allowing either bound to be NULL as it seems to be the case<br>
> (as in "it works").<br>
<br>
Although passing NULL to the constructor works, it does *not* create a<br>
range where one bound is NULL. It actually creates an unbounded range;<br>
that is, a range where one bound is infinite.<br>
<br>
NULL semantics are far too confusing to be useful with ranges. For<br>
instance, if ranges did support NULLs; the queries you mention would<br>
have to return NULL, not FALSE.</div>
</blockquote>
<div> </div>
<div>But I agree that returning NULL would be OK, then it would be easy to catch in queries when starting playing with range-types in queries. Having it implicitly mean infinity comes as a surprise, to me at least.</div>
<div> </div>
<div>But now that I know this it's exactly not a blocker...</div>
<div> </div>
<div class="origo-email-signature">--<br>
Andreas Joseph Krogh <andreak(at)officenet(dot)no> mob: +47 909 56 963<br>
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no<br>
Public key: http://home.officenet.no/~andreak/public_key.asc</div>
<div> </div>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | hxreno1 | 2013-08-30 09:57:00 | Re: My Experiment of PG crash when dealing with huge amount of data |
Previous Message | 高健 | 2013-08-30 09:10:42 | My Experiment of PG crash when dealing with huge amount of data |