The following bug has been logged on the website:
Bug reference: 14815
Logged by: Galiev Mansur
Email address: gomer94@yandex.ru
PostgreSQL version: 9.6.5
Operating system: Ubuntu 16.04.3 LTS x64
Description:
I want to create extension with sql like:
CREATE OR REPLACE FUNCTION keep_any_ddl_command() RETURNS event_trigger LANGUAGE plpgsql AS $$ BEGIN SELECT
classid,objid, objsubid FROM
pg_event_trigger_ddl_commands();
-- some insert code; END;
$$;
CREATE TABLE ddl_events();
CREATE EVENT TRIGGER keep_all_ddl ON ddl_command_end EXECUTE PROCEDURE keep_any_ddl_command();
but when i'm use CREATE EXTENSION i have:
ERROR: pg_event_trigger_ddl_commands() can only be called in an event
trigger function
CONTEXT: SQL statement "SELECT classid, objid, objsubid FROM
pg_event_trigger_ddl_commands()"
PL/pgSQL function keep_any_ddl_command() line 3 at SQL statement
if create this objects without extension, all ok
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs