Fixed the return type RETURNS TIMESTAMP WITH TIME ZONE AS $$ and sqlj function

This commit is contained in:
vpj-cd 2007-12-06 01:25:22 +00:00
parent c3f14d4e15
commit d3c61f55ae
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;