From: Tom Lane <tgl@sss.pgh.pa.us>
To: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16266: Server crash on SELECT event_trigger-returning function
Date: Wed, 19 Feb 2020 11:05:05 -0500
Message-ID: <19565.1582128305@sss.pgh.pa.us> (raw)
In-Reply-To: <16266-fcd7f838e97ba5d4@postgresql.org>
References: <16266-fcd7f838e97ba5d4@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16266: Server crash on SELECT event_trigger-returning function
In-Reply-To: <19565.1582128305@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox