pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ing. Jhon Carrillo <jdigital@cantv.net>
To: pgsql-sql@postgresql.org
Subject: error in function!!
Date: Mon, 31 Jan 2005 14:59:12 -0400
Message-ID: <009901c507c7$01d882e0$1400a8c0@tgusta2> (raw)

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!!

view thread (2+ messages)  latest in thread

Message-ID: <009901c507c7$01d882e0$1400a8c0@tgusta2>
Permalink:  ../009901c507c7$01d882e0$1400a8c0@tgusta2/
Also on:    postgresql.org/message-id/009901c507c7$01d882e0$1400a8c0@tgusta2

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jdigital@cantv.net
  Subject: Re: error in function!!
  In-Reply-To: <009901c507c7$01d882e0$1400a8c0@tgusta2>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox