Re: Trigger

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Peter Childs <blue(dot)dragon(at)blueyonder(dot)co(dot)uk>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger
Date: 2003-10-23 15:32:13
Message-ID: Pine.LNX.4.33.0310230930400.15470-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 23 Oct 2003, Peter Childs wrote:

>
>
> On Wed, 22 Oct 2003, scott.marlowe wrote:
>
> > On Wed, 22 Oct 2003, Peter Childs wrote:
> >
> > > Is it possible to deferr a trigger until commit, Or to have the
> > > trigger not occur if the transaction is rolled back? Like transaction.
> > > I think its possible since constraints use triggers and if so why
> > > is this a standard feature.
> > > Also is there anyway of seeing what triggers exsist and what they
> > > do? (psql \<somthing> or the like)
> >
> > A trigger inside a transaction should automagically roll back should the
> > transaction fail, shouldn't it?
> >
> >
>
> Only if it only affects that database. If the trigger uses C to
> tell an outside app whats going on, it will not get the truth.
> Background, we are trying to get the database to tell clients when
> records get updated, deleted or inserted so that they can update there
> on-screen displays without having to query the database every couple of
> seconds which would put an unnessary strain on the database. Hence
> producing quicker respose times.

It might be more efficient and transactionally safe to write it all to a
temp table, and have a daemon suck that data out every now and then and
put it into another database that the feeders can interrogate as often as
they like. that way you still get the ease of programming a transaction
that's all or nothing, and since the daemon only runs every minute or two
and batches up its access, the impace of the batching should be nominal.
Or would that introduce other problems of its own?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-10-23 15:40:08 Re: database files
Previous Message Richard Huxton 2003-10-23 15:32:05 Re: Setting up DSPACE for Postgres access