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

From: Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl>
To: sandrigo lezcano <psql(at)msa(dot)com(dot)py>
Cc: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>, Pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [Pgsql-ayuda] dateadd(text,int,date)
Date: 2003-06-13 19:46:32
Message-ID: 20030613194632.GA25548@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

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[(at)]dcc(dot)uchile(dot)cl>)
"On the other flipper, one wrong move and we're Fatal Exceptions"
(T.U.X.: Term Unit X - http://www.thelinuxreview.com/TUX/)

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera Munoz 2003-06-13 21:01:11 Re: [Pgsql-ayuda] dateadd(text,int,date)
Previous Message Manuel Sugawara 2003-06-13 19:01:29 Re: [Pgsql-ayuda] Ayuda con funciones