pg_event_trigger_table_rewrite_reason() called out of context
pallavisontakke opened this issue · 1 comments
pallavisontakke commented
Though this issues shows up with code 'e', from PostgreSQL code and documentation, pg_event_trigger_table_rewrite_reason() can only be called in a table_rewrite event trigger function.
In SQLSmith with PostgreSQL 9.5, looks like query being generated does not have event trigger or table rewrite, however it calls this function and shows error (as expected).
Attaching query over here.
postgresql_event_trigger_table_rewrite_reason.txt
anse1 commented
Ack, trigger functions should be blacklisted in schema.cc until there is some mechanism to employ them in the right context in the grammar.