[Pgsql-ayuda] dateadd(text,int,date)

Alvaro Herrera Munoz alvherre@dcc.uchile.cl
Fri, 13 Jun 2003 15:46:32 -0400


On Fri, Jun 13, 2003 at 03:42:22PM +0100, sandrigo lezcano wrote:

> > create or replace function dateadd(text,int,date) returns date as '
> > declare
> 
> dbtests=# select dateadd('months',-5,'2003-11-06');
> ERROR: Function dateadd("unknown", integer, "unknown") does not exist
>        Unable to identify a function that satisfies the given argument types
>        You may need to add explicit typecasts

Si dice "you may need to add explicit typecasts", lo primero que debes probar
es agregar conversiones explicitas de tipos.  Por ejemplo,

select dateadd('months'::text, -5, '2003-11-06'::date);

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"On the other flipper, one wrong move and we're Fatal Exceptions"
(T.U.X.: Term Unit X  - http://www.thelinuxreview.com/TUX/)