Code

RRTimeslice: Added cast from timestamptz to rrtimeslice.
[postrr.git] / src / postrr.sql.in
index 9f34f22100cfd04151da1afb56ca23ec2c3538d8..eb197452a5ca6e1e4a771398854efc0d0d625975 100644 (file)
@@ -108,6 +108,15 @@ CREATE CAST (rrtimeslice AS rrtimeslice)
        WITH FUNCTION RRTimeslice(rrtimeslice, integer, boolean)
        AS IMPLICIT;
 
+CREATE OR REPLACE FUNCTION RRTimeslice(timestamptz, integer, boolean)
+       RETURNS rrtimeslice
+       AS 'postrr-@POSTRR_MAJOR_VERSION@.@POSTRR_MINOR_VERSION@', 'timestamptz_to_rrtimeslice'
+       LANGUAGE 'C' IMMUTABLE STRICT;
+
+CREATE CAST (timestamptz AS rrtimeslice)
+       WITH FUNCTION RRTimeslice(timestamptz, integer, boolean)
+       AS IMPLICIT;
+
 CREATE OR REPLACE FUNCTION Tstamptz(rrtimeslice)
        RETURNS timestamptz
        AS 'postrr-@POSTRR_MAJOR_VERSION@.@POSTRR_MINOR_VERSION@', 'rrtimeslice_to_timestamptz'