Class PreJSR310

  • @SQLAction(provides="language java_tzset",install="SELECT sqlj.alias_java_language(\'java_tzset\', true)",remove="DROP LANGUAGE java_tzset") @SQLAction(implementor="postgresql_ge_90300",requires="issue199",install="SELECT javatest.issue199()")
    public class PreJSR310
    extends Object
    Some tests of pre-JSR 310 date/time/timestamp conversions.

    For now, just java.sql.Date, thanks to issue #199.

    This example relies on implementor tags reflecting the PostgreSQL version, set up in the ConditionalDDR example.

    • Method Detail

      • issue199

                  requires="language java_tzset",
        public static void issue199()
                             throws SQLException
        Test for a regression in PG date to/from java.sql.Date conversion identified in issue #199.

        Checks that two months of consecutive dates in October/November 2018 are converted correctly in the Europe/Prague timezone. The actual issue was by no means limited to that timezone, but this test reproducibly detects it.

        This function is defined in the 'alias' language java_tzset, for which there is an entry in the default pljava.policy granting permission to adjust the time zone, which is temporarily done here.