I am a software engineer studying PostgreSQL.
PostgreSQL supports lots of languages (e.g. plpgsql).
I don't see an easy way to install storied procedures.
Is there some sort of pip
or npm
analog?
I found abandoned pex
tool.
PostgreSQL can define functions programmatically.
So it must be trivial to write a function as pg_install_library
taking a link to github repo - pulling files with plpgsql functions, types, then checking declared functions in db and if function is missing or hash code is different then evals new version to declare/redeclare.
# select pg_install_library('http://github.com/hello/world');
create procedure
statement. I think the concept you are looking for is provided through extensions in Postgres.create extension
can be used inpsql
- that doesn't really qualify as "hard" to me. But if you don't want to package your procedures into an extension, then just put them in SQL scripts and run those scripts. You might want to use a schema migration tool like Liquibase to automate thatcreate extension
expects local files at specific location to be ready to read. In cloud setup it is not feasible. The feature is not high level enough. Transitive dependencies are not handled, right?