Re: How to cast a general record? - Mailing list pgsql-general

From Albe Laurenz
Subject Re: How to cast a general record?
Date
Msg-id D960CB61B694CF459DCFB4B0128514C202EA7628@exadv11.host.magwien.gv.at
Whole thread Raw
In response to How to cast a general record?  (Gerhard Heift <ml-postgresql-20081012-3518@gheift.de>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Berend Tober
Date:
Subject: Re: manage changes to views having depencies
Next
From: Gerhard Heift
Date:
Subject: Solution for tranaction independent logging in same database?