[HACKERS] Inserting data into a new catalog table via source code

Поиск
Список
Период
Сортировка
От rqtx
Тема [HACKERS] Inserting data into a new catalog table via source code
Дата
Msg-id r-b5xGAgXUQ_ThgYYcedBUKAsbW8kf1fMmRpUuuj8ypQCuqGtgmYC3v0HkU48GfBn4CrN3Q2wt5KYkKfoJA3fNwmp-K4q9PMvFL3fnneUd4=@protonmail.com
обсуждение исходный текст
Список pgsql-hackers

The company I'm working is currently trying to give some external users access to our database. Said users are partners of ours (company partners).

I was tasked to create a new catalog table to log every user activity (already done) and now I'm trying to insert some information in this table using the CatalogTupleInsert function. The data in question is the query the user issues to psql and the payload of the answer.

My thought process was that I would be able to alter the source code so I would insert this kind of data for every user, him being superuser or not...

Instead, I noticed the data is only  inserted in the table if the forked process (the transaction) is from a user which has the superuser flag...

Is there a way to make this function work with any user?


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Cancelling parallel query leads to segfault
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: reorganizing partitioning code (was: Re: [HACKERS] path towardfaster partition pruning)