Re: [HACKERS] Why does plpython delay composite type resolution? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Why does plpython delay composite type resolution?
Date
Msg-id 4841.1482331189@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Why does plpython delay composite type resolution?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: [HACKERS] Why does plpython delay composite type resolution?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> On 12/21/16 1:55 AM, Andreas Karlsson wrote:
>> Does your patch handle "ALTER TYPE name ADD ATTRIBUTE ..."? My immediate
>> guess would be that it could be a cache invalidation thing.

> Won't that only happen at end of transaction?

No.
BEGIN;SELECT plpython_function();ALTER TYPE ...;SELECT plpython_function();COMMIT;

For that matter, the plpython function could execute the ALTER itself
through SPI, or call another function that does so.

(I'm not claiming that the existing code, either in plpython or other
PLs, necessarily handles such all scenarios nicely.  But we shouldn't
make it worse.)
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Rethinking our fulltext phrase-search implementation
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Proposal : Parallel Merge Join