Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f229b2e

Browse files
authored
spherepoint_hash32: float8 needs wrapping into a Datum (#107)
1 parent 94e498d commit f229b2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/point.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ Datum
315315
spherepoint_hash32(PG_FUNCTION_ARGS)
316316
{
317317
SPoint *p1 = (SPoint *) PG_GETARG_POINTER(0);
318-
Datum h1 = DirectFunctionCall1(hashfloat8, p1->lat);
319-
Datum h2 = DirectFunctionCall1(hashfloat8, p1->lng);
318+
Datum h1 = DirectFunctionCall1(hashfloat8, Float8GetDatum(p1->lat));
319+
Datum h2 = DirectFunctionCall1(hashfloat8, Float8GetDatum(p1->lng));
320320

321321
PG_RETURN_INT32(DatumGetInt32(h1) ^ DatumGetInt32(h2));
322322
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /