Is it possible to get username information while writing trigger?

Поиск
Список
Период
Сортировка
От a
Тема Is it possible to get username information while writing trigger?
Дата
Msg-id tencent_5889CA742370FDD1149BA470@qq.com
обсуждение исходный текст
Ответы Re: Is it possible to get username information while writingtrigger?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general
Hey:

What I want is to add a log entry at the last column of each row, which will record the history update, insert automatically when relative statement is processed.

I have read the documentation on triggers, which helps a lot. However, I may have few more extra requirement to complete my wishes:

1, I would like to get the username of who executed the statement;

2, I would like to get the column name that is being updated;

If it is possible and how should I do it??

Thanks a lot!

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

Предыдущее
От: tango ward
Дата:
Сообщение: Re: psycopg2.DataError: invalid input syntax for integer: ""
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Is it possible to get username information while writingtrigger?