Re: How to implement GOMONTH function

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to implement GOMONTH function
Date: 2007-05-16 17:51:22
Message-ID: f2fgua$2lbn$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Greenwood 2007-05-16 17:56:53 to_number behavior change between 8.1 and 8.2
Previous Message Henry 2007-05-16 16:30:03 Committing in a trigger