plv8ify
plv8ify copied to clipboard
feat(pg-tle-mode): deploy the functions from a provided output folder as a pg_tle extension
Fix https://github.com/divyenduz/plv8ify/issues/23
Demo:
https://user-images.githubusercontent.com/746482/236679121-23814fbf-ee6a-4b10-8c5a-799af3974d5b.mp4
@samwillis Thanks for suggesting this feature in #23, if you get a moment, please give me a review on this one. This implements the first version of pg_tle
mode.
For now, it removes and updates the same extension name/version instead of using the versions concept from pg_tle
. I will probably merge this as is to already start playing around with pg_tle
+ https://database.dev and slowly build APIs for better usage of versioning API. Not doing that right now because need to clean up the code a bit + add a bunch of tests etc.
What do you think?
P.S. I made a deploy feature via https://github.com/divyenduz/plv8ify/pull/19, this PR adds pg_tle
mode to it.
Look awesome @divyenduz!
The deploy command is really good for working on extensions for internal use.
My main thought is that the combining the "building" of the tle extension with the deploy command (if I understand correctly) limits the ability to further distribute the extension. It would be good if there was a way to build the tle extension as a single .sql that can be distributed, either via database.dev or any other means.
I was imagining maybe --mode tle
, or --mode bundle --package-as-tle
(which gives flexibility of build modes)
Superbase are working on a command line tool to enable uploading extensions to database.dev, and so having a way to build, then call that (when they finish it) to upload it would be perfect.