Aleksander Alekseev wrote:
> According to my colleagues it would be very nice to have this feature.
> For instance, if you are trying to optimize PostgreSQL for application
> that uses COPY and you don't have access to or something like this.
> It could also be useful in some other cases.
Outside of the app, what can be already set up is an AFTER INSERT
FOR EACH ROW trigger that essentially does:
raise LOG, '%', NEW;
The main drawback of this approach is that, for each line of data
emitted to the log, there's another STATEMENT: copy... line added.
But that might be not too bad for certain uses.
Ideally we should be able to access the new rowset as a whole through
a statement-level trigger. In that case, the data could be logged in
a one-shot operation by that trigger.
There's a related item in the TODO list:
"Allow statement-level triggers to access modified rows"
and an old thread on -hackers here:
that discussed this topic in relation to MSSQL having this functionality.
PostgreSQL-powered mailer: http://www.manitou-mail.org
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: