Skip site navigation (1) Skip section navigation (2)

Re: Extension tracking temp table and causing update failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Phil Sorber <phil(at)omniti(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Extension tracking temp table and causing update failure
Date: 2012-03-08 19:44:21
Message-ID: 925.1331235861@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
I wrote:
> Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)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


Attachment: no-temp-in-extensions.patch
Description: text/x-patch (6.9 KB)

In response to

Responses

pgsql-bugs by date

Next:From: Bill MacArthurDate: 2012-03-08 20:20:13
Subject: table row type and query-specified row type do not match
Previous:From: Bill MacArthurDate: 2012-03-08 19:40:26
Subject: table row type and query-specified row type do not match

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group