|Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
|Fix some corner cases that cube_in rejects
|Raw Message | Whole Thread | Download mbox | Resend email
In bug #14300 it's pointed out that cube_in rejects zero-element
cubes, as well as infinity and NaN coordinate values. Since it's
easy to make such cube values via the cube-from-float-array
constructors, this is a dump/reload hazard. The attached proposed
patch attempts to fix it up.
To deal with the infinity/NaN issues, I made cube_in and cube_out rely
on float8in_internal and float8out_internal, as we recently did for the
core geometric types. That causes the response to "1e-700" to be an
out-of-range error rather than silent underflow, which seems to me to
be fine, especially since it removes the platform dependency that's
responsible for needing the separate cube_1.out and cube_3.out files.
I also took the opportunity to make cube_in's error strings and ERRCODE
results match project convention. This is maybe a bit more debatable,
but I think it's worth doing as long as we're touching the function's
I found only one other place that seemed to be assuming that cubes
aren't zero-length, but it would be worth someone reviewing it again
to see if I missed anything. I'll put this on the commitfest queue.
regards, tom lane
|Re: OpenSSL 1.1 breaks configure and more
|Re: Renaming of pg_xlog and pg_clog