There are some laws in my country that require me (as a service provider) to have a log which explains which person did what action. Now I know that PostgreSQL has a query log, but I was wondering if it also has some sort of identity management, so I also know which user ran the query.
I also realize that PostgreSQL can't know the user system in my application, but I was wondering if there is some sort of way where I can inform PostgreSQL which is the user table, session table and so on, so he can make the link automatically between an application user and a query. I know it's a long shot, but I thought I'd try.