error in function!! - Mailing list pgsql-sql

From Ing. Jhon Carrillo
Subject error in function!!
Date
Msg-id 009901c507c7$01d882e0$1400a8c0@tgusta2
Whole thread Raw
Responses Re: error in function!!
List pgsql-sql
Hi,
 
i have a problem  with the following sentence:
 
 
CREATE OR REPLACE FUNCTION tschema.sp_actualizar_contacto(p_idpers text,
                                                          p_nombre text,
                                                          p_apellido text,
                                                          p_titulo text,
                                                          p_fecnac text,
                                                          p_codedociv integer,
                                                          p_sexo       text,
                                                          p_codpais    integer,
                                                          p_pw text,
                                                          p_empr text,
                                                          p_cargo  text, 
                                                          p_pwempr text,
                                                          p_aniv text, 
                                                          p_prof text,
                                                          p_trab  text,
                                                          p_fecgen text, 
                                                          p_fecing text,
                                                          p_fuente text,
                                                          p_codupload integer,
                                                          cli_codigo integer ) RETURNS text as '
 
DECLARE
   c_codigo         integer;
   c_sinc           varchar;
   c_idpers         ALIAS for $1;
   c_nombre         ALIAS for $2;
   c_apellido       ALIAS for $3;
   c_titulo         ALIAS for $4;
   c_fecnac         ALIAS for $5;
   c_codedociv      ALIAS for $6;
   c_sexo           ALIAS for $7;
   c_codpais        ALIAS for $8;
   c_pw             ALIAS for $9;
   c_empr           ALIAS for $10;
   c_cargo          ALIAS for $11;
   c_pwempr         ALIAS for $12;
   c_aniv           ALIAS for $13;
   c_prof           ALIAS for $14;
   c_trab           ALIAS for $15;
   c_fecgen         ALIAS for $16;
   c_fecing         ALIAS for $17;
   c_fuente         ALIAS for $18;
   c_codupload      ALIAS for $19;
   cli_Codigo       ALIAS for $20;
BEGIN
   select  nextval(''seq_tbu_contacto_cont_codigo'')  into  c_codigo;

   Insert  into  tbu_contacto  (cont_codigo, cont_idpers,cont_nombre,cont_apellido,cont_titulo,cont_fecnac,cont_codedociv,cont_sexo,cont_codpais,cont_pw,cont_empr,cont_cargo,cont_pwempr,cont_aniv,cont_prof,cont_trab,cont_fecgen,cont_fecing,cont_fuente,cont_sinc,cont_codupload) values (c_codigo,c_idpers,c_nombre,c_apellido,c_titulo,to_timestamp(c_fecnac,''YYYY-mm-dd HH:MM:SS''),c_codedociv,c_sexo,1,c_pw,c_empr,c_cargo,c_pwempr,c_aniv,c_prof,c_trab,to_timestamp(c_fecgen,''YYYY-mm-dd HH:MM:SS''),to_timestamp(CURRENT_TIMESTAMP,''YYYY-mm-dd HH:MM:SS'') ,c_fuente,''S'',c_codupload);          
   return ''OK:''||c_codigo;
END;
' LANGUAGE 'plpgsql'
 
 
this is the error in pgadmin III on windows (postgresql 8.0):
 
ERROR:  function tschema.sp_actualizar_contacto(integer, "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", integer, "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", "unknown", integer, integer) does not exist
HINT:  No function matches the given name and argument types. You may need to add explicit type casts.
 
 
I need to know if the "insert sentence" was sucesfull, how do i do?
 
 
help me with this please,
 
thanks!!

pgsql-sql by date:

Previous
From: Wilton
Date:
Subject: Postgresql number of command
Next
From: "Matteo Braidotti"
Date:
Subject: