Re: Is drop/restore trigger transactional?

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Craig James <cjames(at)emolecules(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Is drop/restore trigger transactional?
Date: 2012-08-08 00:29:02
Message-ID: 5021B2CE.9040706@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 08/08/2012 04:15 AM, Merlin Moncure wrote:
> IF current_user = 'bulk_writer' THEN
> return new;
> END IF;
> <expensive stuff>
... or re-create the trigger with a `WHEN` clause (only available in
newer Pg versions, see CREATE TRIGGER) that excludes the migrated
customer ID. You'd have to do it in a new tx to avoid locking the table
for ages though.

--
Craig Ringer

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Merlin Moncure 2012-08-08 00:42:17 Re: Is drop/restore trigger transactional?
Previous Message Stefan Keller 2012-08-08 00:07:48 Re: Slow query: Select all buildings that have >1 pharmacies and >1 schools within 1000m