Re: A question relative to creating an audit table
От | stan |
---|---|
Тема | Re: A question relative to creating an audit table |
Дата | |
Msg-id | 20200228135947.GA16442@panix.com обсуждение исходный текст |
Ответ на | Re: A question relative to creating an audit table (Andrei Zhidenkov <andrei.zhidenkov@n26.com>) |
Ответы |
Re: A question relative to creating an audit table
|
Список | pgsql-general |
On Thu, Feb 27, 2020 at 10:30:15PM +0100, Andrei Zhidenkov wrote: > Why not to pass TG_TABLE_SCHEMA and TG_TABLE_NAME in its arguments? > > > On 27. Feb 2020, at 22:28, stan <stanb@panix.com> wrote: > > > > I ma considering setting up a function, and triggers to put a record in an > > audit table when certain tables are altered. I pretty much think I know how > > to do this, with one exception. > > > > Can a function, called by a trigger, determine what table it was called > > for? > > I suppose I could do that. I have in mind a single function to accomplish the audit log, but I will have to have unique triggers for each table. I was just hoping not to have to do that. Are these values that I could read automatically? Or do I have to hard code them? -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin
В списке pgsql-general по дате отправления: