pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: De Leeuw Guy <G.De_Leeuw@eurofer.be>
Cc: pgsql-admin@postgresql.org
Subject: Re: trigger and pg_fini
Date: Fri, 27 Jul 2007 13:45:41 -0700 (PDT)
Message-ID: <20070727133449.X1155@megazone.bigpanda.com> (raw)
In-Reply-To: <46AA144F.3010604@eurofer.be>
References: <46AA144F.3010604@eurofer.be>

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.



view thread (4+ messages)  latest in thread

Message-ID: <20070727133449.X1155@megazone.bigpanda.com>
Permalink:  ../20070727133449.X1155@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20070727133449.X1155@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, G.De_Leeuw@eurofer.be
  Subject: Re: trigger and pg_fini
  In-Reply-To: <20070727133449.X1155@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox