Re: truncate in combination with deferred triggers

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Markus Schiltknecht <markus(at)bluegap(dot)ch>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: truncate in combination with deferred triggers
Date: 2006-09-02 21:20:54
Message-ID: 200609022120.k82LKsB05953@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Is this a TODO or is it going to be fixed for 8.2?

---------------------------------------------------------------------------

Tom Lane wrote:
> Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> writes:
> > Yeah, I think there are a few possibilities around truncate inside a
> > savepoint that's rolledback that we have to be careful of.
>
> Yuck :-(
>
> > If we could mark the entries in some way so we knew whether or not they
> > were made obsolete by a truncate of our own tranasaction or a committed or
> > rolled back past subtransaction of ours, we could probably make both of
> > these work nicely.
>
> That seems much more trouble than it's worth, unless someone can
> convince me that this isn't a corner case with little real-world value.
>
> Furthermore, this still doesn't address the worry about whether there
> are cases where dropping the trigger calls would be inappropriate.
>
> I propose just having TRUNCATE check for pending triggers on the
> target tables, and throw an error if there are any.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-09-03 01:21:53 Re: BUG #2599: AM/PM doesn't work in to_timestamp in
Previous Message Junior Leao 2006-09-02 20:15:39 BUG #2607: Problems in pg_exec() [function.pg-exec / pg_fetch_object