Fixed the return type RETURNS TIMESTAMP WITH TIME ZONE AS $$ and sqlj function
This commit is contained in:
parent
c3f14d4e15
commit
d3c61f55ae
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue