Re: Calling function (table_name, schema_name) within event trigger

Поиск
Список
Период
Сортировка
От Andreas Kretschmer
Тема Re: Calling function (table_name, schema_name) within event trigger
Дата
Msg-id 270483278.2003.1451243520245.JavaMail.open-xchange@oxweb01.ims-firmen.de
обсуждение исходный текст
Ответ на Re: Calling function (table_name, schema_name) within event trigger  (Melvin Davidson <melvin6925@gmail.com>)
Ответы Re: Calling function (table_name, schema_name) within event trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general

> Melvin Davidson <melvin6925@gmail.com> hat am 27. Dezember 2015 um 19:55
> geschrieben:
>
>
> It's kind of difficult to figure out what is going on. Apparently, the
> function that is called "store.add_history_master()" thinks tg_table_name
> is a COLUMN in a table, as evidenced by
> "ERROR: column "tg_table_name" does not exist"
>
> Offhand, you probably want to assign TG_TABLE_NAME to a var and then call
> the function using the var.
> EG:
> DECLARE
>   V_TABLE name := TG_TABLE_NAME;
>
> SELECT store.add_history_master($V_TABLE, ....
>
>
> Would you be so kind as to grace us with
> A. The VERSION of PostgreSQL you are working with
> B. The O/S you are working with.
> C. The complete called function IE: store.add_history_master(..)


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.

And: the version is 9.4.4, as you (!) quoted it.

Please don't top-posting, it's hard to understand (as we can see here ...)


Sue: sorry, i haven't a solution, but it's an interesting question. I hope for a
solution.


В списке pgsql-general по дате отправления:

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Calling function (table_name, schema_name) within event trigger
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Calling function (table_name, schema_name) within event trigger