PL/pgSQL package manager for Postgres libraries
emmalee last edited by
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
npmanalog? I found abandoned
PostgreSQL can define functions programmatically. So it must be trivial to write a function as
pg_install_librarytaking 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');
The equivalent would be a PostgreSQL https://www.postgresql.org/docs/current/extend-extensions.html . Extensions have support for versioning and dependencies to other extensions.
Sure, you need shell access to the database machine to install the extension, just like with
pipand other package managers.