PL/pgSQL package manager for Postgres libraries



  • 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');
    


  • 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 pip and other package managers.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2