PG Bug reporting form <noreply@postgresql.org> writes:
> The following query:
> CREATE OR REPLACE FUNCTION et() RETURNS event_trigger
> LANGUAGE plpgsql AS $$
> BEGIN
> END;
> $$;
> SELECT et();
> leads to a server crash with the following stack trace:
Yeah. If you didn't just validate the function, it does the expected
thing:
regression=# SELECT et();
ERROR: trigger functions can only be called as triggers
CONTEXT: compilation of PL/pgSQL function "et" near line 1
I think perhaps the problem is that compute_function_hashkey hasn't
been fixed to deal with event triggers sanely. They need to not
have the same hash keys as ordinary function calls.
regards, tom lane