Colegas eu tenho uma função para validar usuário:
declare
v_codigo integer;
begin
select id_usuario into v_codigo
from seguranca.usuario
where id_usuario=codigo_usuario;
return true;
exception
when no_data_found then
return false;
end;
Estou, na trigger, chamando-a assim:
if seguranca.validar_usuario(new.id_usuario_gerador)=false then
raise exception 'Usuário não cadastrado';
end if;
erro:
ERRO: erro de sintaxe em ou próximo a "if"
LINE 2: if seguranca.validar_usuario(4)=false then
^
********** Error **********
ERRO: erro de sintaxe em ou próximo a "if"
SQL state: 42601
Character: 8
Como posso resolver???
--
Marcelo
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral