Re: How to implement GOMONTH function

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to implement GOMONTH function
Дата
Msg-id f2fgua$2lbn$1@news.hub.org
обсуждение исходный текст
Ответ на Re: How to implement GOMONTH function  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: How to implement GOMONTH function
Список 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 по дате отправления: