Skip to content

Instantly share code, notes, and snippets.

@AlexRogalskiy
Created December 19, 2020 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexRogalskiy/14c0dfbfc11b993b2f425769fd9b4bbf to your computer and use it in GitHub Desktop.
Save AlexRogalskiy/14c0dfbfc11b993b2f425769fd9b4bbf to your computer and use it in GitHub Desktop.
Java extension for Postgres
SET pljava.libjvm_location TO '/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/amd64/server/libjvm.so';
CREATE EXTENSION pljava;
GRANT USAGE ON LANGUAGE java TO postgres;
ALTER DATABASE postgres SET pljava.libjvm_location FROM CURRENT;
SELECT sqlj.install_jar( 'file:///tmp/simple-java-function/target/simple-java-function.jar','jfunctions', true );
SELECT sqlj.set_classpath( 'public', 'jfunctions' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment