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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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 | Content-Type | Size |
---|---|---|
no-temp-in-extensions.patch | text/x-patch | 6.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bill MacArthur | 2012-03-08 20:20:13 | table row type and query-specified row type do not match |
Previous Message | Bill MacArthur | 2012-03-08 19:40:26 | table row type and query-specified row type do not match |