Re: How to implement GOMONTH function - Mailing list pgsql-general

From Andrus
Subject Re: How to implement GOMONTH function
Date
Msg-id f2fgua$2lbn$1@news.hub.org
Whole thread Raw
In response to Re: How to implement GOMONTH function  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: How to implement GOMONTH function
List pgsql-general
Thank all very much for great suggestions.

I created function

CREATE OR REPLACE FUNCTION PUBLIC.GOMONTH(DATE, INTEGER, OUT DATE) IMMUTABLE
AS
$_$
SELECT ($1 + ($2 * '1 MONTH'::INTERVAL))::DATE;
$_$ LANGUAGE SQL;

I got errors:

function gomonth(date, numeric) does not exist

and

function gomonth(date, bigint ) does not exist

How to fix those errors ?


Andrus.


pgsql-general by date:

Previous
From: Kimball
Date:
Subject: tsearch2 keep throw-away characters
Next
From: Henry
Date:
Subject: Committing in a trigger