aws / pg_tle

Framework for building trusted language extensions for PostgreSQL
Apache License 2.0
333 stars 31 forks source link

Convert examples to use pgtle.mk #253

Closed adamguo0 closed 9 months ago

adamguo0 commented 10 months ago

Issue #, if available:

Description of changes: Adds a pgtle.mk Makefile and a create_pgtle_scripts.sh to automatically install regular trusted language Postgres extensions using make install. Reorganize the examples directory so that each example is a regular Postgres extension with sql files, control file, and Makefile that can be installed with either PGXS or pg_tle Make targets.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

anth0nyleung commented 10 months ago

Is it possible to set up CI to test for installing these example?

adamguo0 commented 10 months ago

Is it possible to set up CI to test for installing these example?

I'm trying to setup make installcheck in a way that lets you seamlessly run normal regression tests in a pg_tle context without any changes, that would be ideal to reduce friction. pg_regress is somewhat limiting though so I'm not sure this is possible

adamguo0 commented 9 months ago

Integrating regression tests in a seamless way will take more effort since pg_regress doesn't provide a way to run a setup script first before the tests (my working example uses an ugly psql wrapper script), so let's address that in a follow up. Rebased against main, no further changes made

jkatz commented 9 months ago

Forgot to mention, I think this is a really good idea -- nice work!