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

From: "sandrigo lezcano" <psql(at)msa(dot)com(dot)py>
To: "Manuel Sugawara" <masm(at)fciencias(dot)unam(dot)mx>
Cc: <Pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: [Pgsql-ayuda] dateadd(text,int,date)
Date: 2003-06-13 14:42:22
Message-ID: 02c901c331ba$0b5e8dd0$2508000a@atellov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

----- Original Message -----
"Manuel Sugawara" Sent: Friday, June 13, 2003 5:12 PM

> > db=# SELECT DATE '2003-06-11' - INTERVAL '5 months';

> create or replace function dateadd(text,int,date) returns date as '
> declare
> v_tmp text;
> begin
> v_tmp := $2 || '' '' || $1;
> return $3 + cast(v_tmp as interval);
> end;
> ' language 'plpgsql';

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

dbtests=# select dateadd('months',-5,current_date);
ERROR: Function dateadd("unknown", integer, date) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts

??????...

sandrigo

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera Munoz 2003-06-13 14:44:03 Re: [Pgsql-ayuda] BD crece desmesuradamente
Previous Message sandrigo lezcano 2003-06-13 10:54:41 Re: [Pgsql-ayuda] Esquema de seguridad (mas informacion)