Gerhard Heift wrote:
> I want to log with triggers or in functions, and these logs should be
> independet of the transaction. Beside i want to have the information
> which action was commited and which not.
> 
> So my idea was to log into the same database with dblink, return the
> primary keys and add them into a commit table.
> 
> But my problem is, that I do not now how to write the rule properly.

The part of your plan where I see the biggest problem is the wish
to log whether the transaction was committed or not. You will probably
not be able to do that.

> CREATE OR REPLACE RULE "insert_log" AS ON INSERT TO log DO INSTEAD

... and shouldn't it be "DO ALSO"?

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to