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?