Peter Eisentraut <peter_e@gmx.net> writes:
> Implementing this type of syntax checker isn't hard since the code is
> already there, but there might be a small, ugly problem. IIRC, the
> parser and/or semantic analyzer of PL/pgSQL relies on knowing whether
> the function is called as a trigger. You don't know that at creation
> phase.
Looking for RETURNS TRIGGER seems like an adequate cue for that.
regards, tom lane