begriffs / pg_rational

Precise fractional arithmetic for PostgreSQL
MIT License
233 stars 14 forks source link

Fix build on old postgres #20

Closed begriffs closed 4 years ago

begriffs commented 4 years ago

Following suggestion in #19

begriffs commented 4 years ago

@df7cb I've got it working on pg10 now, with the shim, but it's broken for pg 9 versions. It appears to compile fine but seems as if it doesn't get installed to the db properly. Can you look over the Travis logs and see if you have any idea what's wrong?

df7cb commented 4 years ago

Older PG versions can't use the pg_rational--0.0.1--0.0.2.sql upgrade files when creating the extension. You need to ship an explicit pg_rational--0.0.2.sql file for these. (Did I mention that sticking with 0.0.1 as extension version would have been easier?)

begriffs commented 4 years ago

@df7cb thanks for your suggestion -- that got it building down to pg 9.6. Any idea what's broken with 9.5 and 9.4?

df7cb commented 4 years ago

ERROR: syntax error at or near "PARALLEL"

begriffs commented 4 years ago

@df7cb I got it building on all the pg versions with a suggestion from @davidfetter

Can you give this a quick review before I merge? Do you think I'm setting the parallel safe attribute appropriately?

begriffs commented 4 years ago

Fixes #17