postgrespro / pgsphere

PgSphere provides spherical data types, functions, operators, and indexing for PostgreSQL.
https://pgsphere.org
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

spherepoint_hash32: float8 needs wrapping into a Datum #107

Closed df7cb closed 7 months ago

df7cb commented 7 months ago

Sorry I forgot to test on 32-bit... The new spherepoint_hash32 function crashes on platforms where float8 is passed by pointer.

vitcpp commented 7 months ago

Well, zero patch number seems to be unlucky :) Having a 32 bit platform in the test pipeline might help to catch such problems. But I haven't found such platforms on GitHub Actions unfortunately.

df7cb commented 7 months ago

The embarrassing part is that I do have such a test pipeline on apt.postgresql.org, but it wasn't running for pgsphere yet:

https://pgdgbuild.dus.dg-i.net/view/Snapshot/job/pgsphere-binaries-snapshot/

df7cb commented 7 months ago

It would avoid the palloc call, true.

TBH, the current implementation is fast on 64-bit platforms, and anyone running database servers on 32-bit today should already be aware that there are limitations. Not sure we have to optimize for that.

vitcpp commented 7 months ago

Dear All, I'm going to increment the patch number and create a new release artifact. Let me know please if you have some objections.

vitcpp commented 7 months ago

Sorry, it seems I haven't merged the change before close. Now fixing it.