Escreva assim:

Create or Replace Function teste()
Returns Trigger
As
$$
Begin
    delete from cliente where cliente_id = old.cliente_id;
End;
$$
language plpgsql;


2008/10/6 Antonio Prado <[EMAIL PROTECTED]>

> Ainda necessitando de ajuda: O que está errado?
>
>
> CREATE OR REPLACE FUNCTION teste() RETURNS TRIGGER AS
> 'DELETE FROM cliente WHERE cliente_id = OLD.cliente_id;'
> LANGUAGE plpgsql;


> CREATE TRIGGER teste AFTER DELETE ON cliente_teste
> FOR EACH ROW EXECUTE PROCEDURE teste();
>
>
> ERROR:  syntax error at or near "DELETE"
> CONTEXT:  compile of PL/pgSQL function "teste" near line 1
>
>
> --
> Antonio Prado
>
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>



-- 
°v°  Ricardo Gonçalves
/(_)\ Dpto de Sistemas
^ ^  Multcont Informática Ltda
     +55 11 4973-2290 / 9280-8976
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a