Skip to content
thallgren edited this page Jan 14, 2013 · 1 revision

##Deploying using JAVA## The PL/Java Deployer is a Java client program that helps you deploy PL/Java in the database. You must use a classpath that can includes the deploy.jar (from the PL/Java distribution) and the postgresql.jar (from the PostgreSQL JDBC distribution) when running the deployer. The former contains the code for the deployer command and the second includes the PostgreSQL JDBC driver. You then run thedeployer with the command:

java -cp <your classpath> org.postgresql.pljava.deploy.Deployer [ options ]

It's recommended that create a shell script or a .bat script that does this for you so that you don't have to do this over and over again. ###Deployer options###

Option Description
-install Installs the Java™ language along with the sqlj procedures. The deployer will fail if the language is installed already
-reinstall Reinstalls the Java™ language and the sqlj procedures. This will effectively drop all jar files that have been loaded
-remove Drops the Java™ language and the sqlj procedures and loaded jars
-user Name of user that connects to the database. Default is the current user
-password Password of user that connects to the database. Default is no password
-database The name of the database to connect to. Default is to use the user name
-host Name of the host. Default is "localhost"
-port Port number. Default is blank

##Deploying using SQL## An alternative to using the deployer is to run the install.sql and uninstall.sql scripts that are included in the distribution using psql.