PostgreSQL extension installation, best practices

postgresqlpostgresql-extensions

I have a SQL only postgres extension I want to make public and share on GitHub, but I want to make sure the installation process is clear to users.

I've just been copying them to the correct directory, but is there a best practice I should follow? Like providing a makefile and documenting that as the correct way of installing — with an aside to point out that actually for this extension at present it's acceptable to just copy the SQL and control files

The extension in it's early state is visible here

Thanks

  • Edited to include link to GitHub extension

Best Answer

I can immediately think of two extensions which have nothing to compile, only files to be copied. I would look to their Makefiles for inspiration.

https://github.com/glynastill/table_log_pl/blob/master/Makefile

https://api.pgxn.org/src/first_last/first_last-0.1.1/Makefile