Re: Calling function (table_name, schema_name) within event trigger
| От | Tom Lane |
|---|---|
| Тема | Re: Calling function (table_name, schema_name) within event trigger |
| Дата | |
| Msg-id | 4353.1451243947@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Calling function (table_name, schema_name) within event trigger (Andreas Kretschmer <andreas@a-kretschmer.de>) |
| Ответы |
Re: Calling function (table_name, schema_name) within
event trigger
Re: Calling function (table_name, schema_name) within event trigger |
| Список | pgsql-general |
Andreas Kretschmer <andreas@a-kretschmer.de> writes: > The problem is, that tg_table_name isn't declared within a event trigger. > TG_TAG is defined, it contains the command, for instance CREATE TABLE. Yeah. According to http://www.postgresql.org/docs/9.4/static/plpgsql-trigger.html#PLPGSQL-EVENT-TRIGGER only TG_TAG and TG_EVENT are defined inside PL/pgSQL event triggers. So at present, you can only do very coarse event recording using PL/pgSQL; if you want to do anything interesting you have to resort to writing your event trigger in C. (And I think that even then, 9.4 did not offer very complete facilities for finding out what the DDL command had done; 9.5 will provide more info.) regards, tom lane
В списке pgsql-general по дате отправления: