| ## PLJava 1.0.0 released ### Bringing the power of Java™ to PostgreSQL™ Functions and Triggers. PLJava is an add on module to the PostgreSQL backend. It falls into the same category as PL/SQL, PL/TCL, PL/Perl, and PL/Python. When installed, functions and triggers can be written in Java using your favorite Java IDE and installed into the database.

### This first release of PLJava provides the following features.

1. Ability to write both functions and triggers using Java 1.4 or higher.
2. Standardized utilities (modeled after the SQL 2003 proposal) to install and maintain Java code in the database.
3. Standardized mappings of parameters and result. Complex types as well as sets are supported.
4. An embedded, high performance, JDBC driver utilizing the internal PostgreSQL SPI routines.
5. Full support for PostgreSQL 8.0 savepoints and exception handling.
6. Integration with GNU GCJ on selected platforms.

### PLJava in brief

A function or trigger in SQL will appoint a static method in a Java class. In order for the function to execute, the appointed class must be installed in the database. PLJava adds a set of functions that helps installing and maintaining the java classes. Classes are stored in normal Java archives (AKA jars). A Jar may optionally contain a deployment descriptor that in turn contains SQL commands to be executed when the jar is deployed/undeployed. The functions are modeled after the standards proposed for SQL 2003.

PLJava implements a standardized way of passing parameters and return values. Complex types and sets are passed using the standard JDBC ResultSet class. Great care has been taken not to introduce any proprietary interfaces unless absolutely necessary so that Java code written using PLJava becomes as database agnostic as possible.

A new JDBC driver is included in PLJava. This driver is written directly on top of the PostgreSQL internal SPI routines. This driver is essential since it's very common for functions and triggers to reuse the database. When they do, they must use the same transactional boundaries that where used by the caller.

PLJava is optimized for performance. The Java virtual machine executes within the same process as the backend itself. This vouches for a very low call overhead. PLJava is designed with the objective to enable the power of Java to the database itself so that database intensive business logic can execute as close to the actual data as possible.

The standard Java Native Interface (JNI) is used when bridging calls from the backend into the Java VM and vice versa. Please read the rationale behind the choice of technology and a more in-depth discussion about some implementation details. PLJava is primarily targeted to the new 8.0 version but will run with PostgreSQL 7.4 versions too albeit with some limitations. Read PLJava and PostgreSQL 8.0 to learn more.

For info on how to get started, please read the release notes. A user guide contains more information on how to create and manage our Java functions and triggers.

Source and selected binaries are available for download. See the download page for more details.