mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
f31a931fad
It's always been possible to create a zero-dimensional cube by converting
from a zero-length float8 array, but cube_in failed to accept the '()'
representation that cube_out produced for that case, resulting in a
dump/reload hazard. Make it accept the case. Also fix a couple of
other places that didn't behave sanely for zero-dimensional cubes:
cube_size would produce 1.0 when surely the answer should be 0.0,
and g_cube_distance risked a divide-by-zero failure.
Likewise, it's always been possible to create cubes containing float8
infinity or NaN coordinate values, but cube_in couldn't parse such input,
and cube_out produced platform-dependent spellings of the values. Convert
them to use float8in_internal and float8out_internal so that the behavior
will be the same as for float8, as we recently did for the core geometric
types (cf commit
|
||
---|---|---|
.. | ||
data | ||
expected | ||
sql | ||
.gitignore | ||
CHANGES | ||
cube--1.0--1.1.sql | ||
cube--1.1--1.2.sql | ||
cube--1.2.sql | ||
cube--unpackaged--1.0.sql | ||
cube.c | ||
cube.control | ||
cubedata.h | ||
cubeparse.y | ||
cubescan.l | ||
Makefile |