While you all are doing this thinking, can I put in am idea?
I, like many others, am working on doing auditing in Postgres.
Something that would be very useful for auditing in a web application
environment would be to be able to pass various identifiers to the db
before any SQL statement is executed. In particular, I'm thinking of
something like Oracle's
SET_IDENTIFIER('string') feature (e.g.:
http://www.quest-pipelines.com/newsletter-v5/0604_C.htm), only
implemented through a driver hook, so that you could set the driver to
always pass this kind of identifier before executing any SQL. This
would allow a very straightforward way to manage users and auditing in a
setting where creating db users is not feasible, and it would be immune
to the problems of connection pooling.
Thoughts? Is this a bad thing to build into the driver?
Cheers,
Eric