apache / datasketches-postgresql

PostgreSQL extension providing approximate algorithms based on apache/datasketches-cpp
https://datasketches.apache.org
Apache License 2.0
84 stars 11 forks source link

Fixes missing VARDATA symbol in PG16 #68

Closed erikmata closed 9 months ago

erikmata commented 9 months ago

When trying to create datasketches extension in PG16, I get an error saying that there's a missing symbol (VARDATA). Adding an include of varatt.h fixes this issue.

erikmata commented 9 months ago

This is my first time trying to contribute to an open source project. Hopefully, I didn't mess anything up.

erikmata commented 9 months ago

BTW, I haven't tested that this works on any other version than PG 16.

AlexanderSaydakov commented 9 months ago

This change does not work with 14.8

erikmata commented 9 months ago

Please see the new commit. I've added a check so the file varatt.h is only included if the PG version >= 16. I've tested this on PG 14.9, 15.4 and 16.0 and it works.

AlexanderSaydakov commented 9 months ago

Thank you!