Class PreJSR310
- java.lang.Object
-
- org.postgresql.pljava.example.annotation.PreJSR310
-
@SQLAction(provides="language java_tzset",install="SELECT sqlj.alias_java_language(\'java_tzset\', true)",remove="DROP LANGUAGE java_tzset") @SQLAction(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.
-
-
Constructor Detail
-
PreJSR310
public PreJSR310()
-
-
Method Detail
-
issue199
@Function(schema="javatest", language="java_tzset", requires="language java_tzset", provides="issue199") 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 defaultpljava.policy
granting permission to adjust the time zone, which is temporarily done here.- Throws:
SQLException
-
-