Logging user queries - Trigger for Select? - Mailing list pgsql-general

From Andrew Gould
Subject Logging user queries - Trigger for Select?
Date
Msg-id 20020218164047.33354.qmail@web13401.mail.yahoo.com
Whole thread Raw
List pgsql-general
Federal laws (HIPAA) in the US are going to require
the tracking of all access (even SELECT) to certain
fields of protected patient information.  The simplest
way that I (not a developer) can think of to
accomplish this is to have a trigger store query
history in a log table.

1.  How can I capture the text of an SQL query (not
the result set) so that it can be used as a value in
an INSERT statement.

2.  Would the PostgreSQL developers consider expanding
the scope of Triggers to include SELECT statements?
(please?)

Thanks,
Andrew Gould

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: libpq or ecpg?
Next
From: Jan Wieck
Date:
Subject: Re: Database Performance?