Package org.postgresql.pljava.example


package org.postgresql.pljava.example
The examples that have been around the longest, and are deployed using hand-written SQL deployment code (see src/main/resources/deployment), not having been reworked to use annotations yet.
Author:
Thomas Hallgren
  • Classes
    Class
    Description
    Example using ResultSetProvider to return 100 rows of two bytea columns each, which should be equal in each row, one being set by updateBinaryStream and the other by updateBytes.
    Example implementing ResultSetProvider to provide a function that generates and returns a lot of rows (caller passes the desired row count) each containing the row number, a random integer, and a timestamp.
    Provides a function to log, at the specified level, a specified message.
    Example returning (varchar,boolean) rows, one for each boolean-valued attribute in the JDBC DatabaseMetaData.
    Example returning (varchar,int) rows, one for each int-valued attribute in the JDBC DatabaseMetaData.
    Example returning (varchar,varchar) rows, one for each String-valued attribute in the JDBC DatabaseMetaData.
    Provides a callMetaData function taking a string that supplies the name of, and arguments to, any ResultSet-returning DatabaseMetaData method, and returns a single-column varchar result, the first row a header, then one for each ResultSet row, semicolons delimiting the original columns.
    Provides a function producing as many rows as requested, each with a random int.
    Provides a function that takes any SQL SELECT query as a string, executes it, and returns the ResultSet produced as a single string column, the first row being a header, then one per row of the ResultSet, semicolons delimiting the original columns.
    Provides a createTempFile function, expected to fail if it is declared with the trusted java language.
    This class contains thread related methods.
    This class contains some triggers that I found written in C under the contrib/spi directory of the postgres source distribution.
    Illustrates various methods of returning composite values.
    Uses the ResultSetHandle interface to implement two functions, listNonSupers and listSupers, returning the corresponding subsets of rows from pg_user.
    Illustrates use of the ResultSetProvider interface to return (key,value) rows from the example.properties file, also making use of PL/Java's ObjectPool facility.
    This implementation uses another function that returns a set of a complex type and returns the ResultSet produced by a query.
    This implementation uses another function that returns a set of a complex type, concatenates the name and value of that type and returns this as a set of a scalar type.