org.postgresql.pljava.deploy

Class Deployer


public class Deployer
extends java.lang.Object

When running the deployer, you must use a classpath that can see the deploy.jar found in the Pl/Java distribution and the postgresql.jar from the PostgreSQL distribution. The former contains the code for the deployer command and the second includes the PostgreSQL JDBC driver. You then run the deployer 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

OptionDescription
-installInstalls the Java language along with the sqlj procedures. The deployer will fail if the language is installed already.
-reinstallReinstalls the Java language and the sqlj procedures. This will effectively drop all jar files that have been loaded.
-removeDrops the Java language and the sqjl procedures and loaded jars
-user <user name>Name of user that connects to the database. Default is current user
-password <password>Password of user that connects to the database. Default is no password
-database <database>The name of the database to connect to. Default is current user
-host <hostname>Name of the host. Default is "localhost"
-windowsUse this option if the host runs on a windows platform. Affects the name used for the Pl/Java dynamic library

Constructor Summary

Deployer(Connection c)

Method Summary

static void
checkIfConnectedAsSuperuser(Connection conn)
void
createSQLJSchema()
void
dropSQLJSchema()
void
initJavaHandlers()
void
initializeSQLJSchema()
static void
main(String[] argv)
static void
printUsage()

Constructor Details

Deployer

public Deployer(Connection c)

Method Details

checkIfConnectedAsSuperuser

public static void checkIfConnectedAsSuperuser(Connection conn)
            throws SQLException

createSQLJSchema

public void createSQLJSchema()
            throws SQLException

dropSQLJSchema

public void dropSQLJSchema()
            throws SQLException

initJavaHandlers

public void initJavaHandlers()
            throws SQLException

initializeSQLJSchema

public void initializeSQLJSchema()
            throws SQLException

main

public static void main(String[] argv)

printUsage

public static void printUsage()

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT