diff --git a/db/ddlutils/postgresql/functions/trunc.sql b/db/ddlutils/postgresql/functions/trunc.sql index d344d18bdb..20a2258488 100644 --- a/db/ddlutils/postgresql/functions/trunc.sql +++ b/db/ddlutils/postgresql/functions/trunc.sql @@ -27,7 +27,7 @@ END; $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITH TIME ZONE, format varchar) -RETURNS DATE AS $$ +RETURNS TIMESTAMP WITH TIME ZONE AS $$ BEGIN IF format = 'Q' THEN RETURN CAST(DATE_Trunc('quarter',datetime) as DATE); diff --git a/migration/330-331b/postgresql/030_BF_1824260.sql b/migration/330-331b/postgresql/030_BF_1824260.sql index 033bd1a1d8..82e5745709 100644 --- a/migration/330-331b/postgresql/030_BF_1824260.sql +++ b/migration/330-331b/postgresql/030_BF_1824260.sql @@ -2,7 +2,7 @@ -- http://sourceforge.net/tracker/?func=detail&atid=879332&aid=1824260&group_id=176962 -- CREATE OR REPLACE FUNCTION trunc(datetime TIMESTAMP WITH TIME ZONE) -RETURNS DATE AS $$ +RETURNS TIMESTAMP WITH TIME ZONE AS $$ BEGIN RETURN CAST(datetime AS DATE); END;