Boa noite Pessoal,

tenho uma função bem simples, mas ao tentar executar diz que nao existe,
alguem pode me dizer o que estou fazendo errado?

CREATE OR REPLACE FUNCTION get_nova_mensagem(_idexterno integer, _idempresa
integer, _mensagem text, _telefone text, _tipopessoa integer, _dtregistro
timestamp without time zone, _status integer)  RETURNS bigint AS
$BODY$
  DECLARE
  _idmensagem integer;
  BEGIN
  INSERT INTO mensagem(idexterno, idempresa, mensagem, telefone,
tipopessoa, dtregistro, status)
    VALUES (_idexterno, _idempresa, _mensagem, _telefone, _tipopessoa,
_dtregistro, _status) RETURNING id INTO STRICT _idmensagem;
  RETURN _idmensagem;
  END;
  $BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION get_nova_mensagem(integer, integer, text, text, integer,
timestamp without time zone, integer)
  OWNER TO dk;

executo o comando: SELECT * FROM get_nova_mensagem(1, 1, 'teste',
'9900000', 1, now(), 0);


ERROR:  function get_nova_mensagem(integer, integer, unknown, unknown,
integer, timestamp with time zone, integer) does not exist
LINE 1: SELECT * FROM get_nova_mensagem(1, 1, '', '', 1, now(), 0);
                      ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.
********** Error **********

ERROR: function get_nova_mensagem(integer, integer, unknown, unknown,
integer, timestamp with time zone, integer) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need
to add explicit type casts.
Character: 15




-- 

Douglas Fabiano Specht
_______________________________________________
pgbr-geral mailing list
pgbr-geral@listas.postgresql.org.br
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a