Re: Make a SQL statement not run trigger

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Jon Collette" <jon(at)etelos(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Make a SQL statement not run trigger
Date: 2007-08-21 23:01:24
Message-ID: dcc563d10708211601n3bb0f9dald53423f3837f8849@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 8/21/07, Jon Collette <jon(at)etelos(dot)com> wrote:
> I think this will work for what I need. I have been messing around with
> this using select into
>
> /select True as donothing into temporary table table_trigger_name;
> then run statement that I want to be ignored
> /
> The trigger would have a select upon the table_trigger_name to determine
> if it should run or not. I am having issues catching the exception when
> the table is not found.
>

Note that if you use temp tables much, you need to make sure that
autovacuum is up and running (or vacuum regularly) to keep the system
catalogs from getting bloated. Just FYI.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2007-08-21 23:04:56 Re: SELECT syntax synopsis: column_definition?
Previous Message Jon Collette 2007-08-21 22:49:50 Re: Make a SQL statement not run trigger