Re: How to cast a general record?

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Gerhard Heift *EXTERN*" <ml-postgresql-20081012-3518(at)gheift(dot)de>, "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to cast a general record?
Date: 2009-01-02 07:41:56
Message-ID: D960CB61B694CF459DCFB4B0128514C202EA7628@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gerhard Heift 2009-01-02 08:53:58 Solution for tranaction independent logging in same database?
Previous Message Berend Tober 2009-01-02 00:27:33 Re: manage changes to views having depencies