Class SetOfRecordTest

  • All Implemented Interfaces:
    org.postgresql.pljava.ResultSetHandle

    @SQLAction(requires="selecttorecords fn",
               implementor="postgresql_ge_80400",
               install=" SELECT   CASE WHEN r IS DISTINCT FROM ROW(\'Foo\'::varchar, 1::integer, 1.5::float,        23.67::decimal(8,2), \'2005-06-01\'::date, \'20:56\'::time,        \'192.168\'::cidr)   THEN javatest.logmessage(\'WARNING\', \'SetOfRecordTest not ok\')   ELSE javatest.logmessage(\'INFO\', \'SetOfRecordTest ok\')   END  FROM   javatest.executeselecttorecords(    \'select \'\'Foo\'\',  1,  1.5::float,  23.67,  \'\'2005-06-01\'\',             \'\'20:56\'\'::time, \'\'192.168.0\'\'\')   AS r(t_varchar varchar, t_integer integer, t_float float,       t_decimal decimal(8,2), t_date date, t_time time, t_cidr cidr)")
    public class SetOfRecordTest
    extends Object
    implements org.postgresql.pljava.ResultSetHandle
    Example implementing the ResultSetHandle interface, to return the ResultSet from any SQL SELECT query passed as a string to the executeSelect function.

    This example relies on implementor tags reflecting the PostgreSQL version, set up in the ConditionalDDR example. Before PostgreSQL 8.4, there was no = or DISTINCT FROM operator between row types.