pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Phil Sorber <phil@omniti.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Extension tracking temp table and causing update failure
Date: Thu, 08 Mar 2012 14:44:21 -0500
Message-ID: <925.1331235861@sss.pgh.pa.us> (raw)
In-Reply-To: <13187.1331227161@sss.pgh.pa.us>
References: <CADAkt-i4kJn_ht=+6x408uVjQG4XKjvy3FbyMKer+oJATLWykQ@mail.gmail.com>
	<21101.1331071837@sss.pgh.pa.us>
	<87linc93iq.fsf@hi-media-techno.com>
	<8167.1331135949@sss.pgh.pa.us>
	<15629.1331145998@sss.pgh.pa.us>
	<m2y5rbxc36.fsf@2ndQuadrant.fr>
	<13187.1331227161@sss.pgh.pa.us>

I wrote:
> Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
>> Could we force temp tables created in an extension script to be ON
>> COMMIT DROP so that CurrentExtensionObject is still set and your patch
>> kicks in, preventing the DROP cascading?

> Huh, yeah, that might work.  It's ugly but at least the ugliness is
> localized; and there's no obvious reason why such a temp table ought to
> survive past the end of the script.

Actually, after I got done hacking the temp-schema case, I realized that
preventing temp tables from becoming extension members isn't so ugly as
I first thought; in fact, it's pretty much a one-liner, and much cleaner
than hacking ON COMMIT DROP.  PFA a patch that fixes both of the
temp-table issues.

			regards, tom lane

view thread (12+ messages)  latest in thread

Message-ID: <925.1331235861@sss.pgh.pa.us>
Permalink:  ../925.1331235861@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/925.1331235861@sss.pgh.pa.us

 ·  · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dimitri@2ndQuadrant.fr, phil@omniti.com
  Subject: Re: Extension tracking temp table and causing update failure
  In-Reply-To: <925.1331235861@sss.pgh.pa.us>
  References: <CADAkt-i4kJn_ht=+6x408uVjQG4XKjvy3FbyMKer+oJATLWykQ@mail.gmail.com> <21101.1331071837@sss.pgh.pa.us> <87linc93iq.fsf@hi-media-techno.com> <8167.1331135949@sss.pgh.pa.us> <15629.1331145998@sss.pgh.pa.us> <m2y5rbxc36.fsf@2ndQuadrant.fr> <13187.1331227161@sss.pgh.pa.us> <925.1331235861@sss.pgh.pa.us>

* 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