Skip site navigation (1) Skip section navigation (2)

Re: trigger and pg_fini

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: De Leeuw Guy <G(dot)De_Leeuw(at)eurofer(dot)be>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: trigger and pg_fini
Date: 2007-07-27 20:45:41
Message-ID: 20070727133449.X1155@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Fri, 27 Jul 2007, De Leeuw Guy wrote:

> I make a lot of tests with trigger and first problem the function
> _PG_fini are never called it is a bug ?.

_PG_fini is called when the file is unloaded, but not at process end,
according to the documentation, so I don't think it does what you want.

> This is a big problem for me because I want to cleanup the data managed
> by my trigger.

What data are you managing? If you can palloc it into an appropriately
lived context, it might be easier for you to manage.

> second problem I cannot detect from a trigger the kind of call (row or
> transaction)

What information do you want?

You can get whether it's a row or transaction event, as well as whether it
was insertion, update or delete from the context.

In response to

Responses

pgsql-admin by date

Next:From: Tena SakaiDate: 2007-07-28 00:25:00
Subject: documentation question
Previous:From: guzmicDate: 2007-07-27 20:27:48
Subject: instaling Libxml2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group