Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyPp0-0007wp-Bk for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 23:05:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyPoy-0002Q8-2G for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Sep 2018 23:05:48 +0000 Received: from makus.postgresql.org ([174.143.35.229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyPox-0002Q1-O2 for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 23:05:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyPou-0007hI-WD for pgsql-hackers@lists.postgresql.org; Fri, 07 Sep 2018 23:05:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w87N5dr6028552; Fri, 7 Sep 2018 19:05:39 -0400 From: Tom Lane To: Bruce Momjian cc: Gunnlaugur Thor Briem , Adrian Klaver , pgsql-hackers@lists.postgresql.org Subject: Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist) In-reply-to: <20180907225643.GI28811@momjian.us> References: <20180829190635.GD25450@momjian.us> <6c73c320-95b7-c259-e309-c46300557852@aklaver.com> <6e023cde-943a-5cea-8626-f1e9b29695df@aklaver.com> <12109.1536174213@sss.pgh.pa.us> <22723.1536187020@sss.pgh.pa.us> <20180907223247.GH28811@momjian.us> <6520.1536360232@sss.pgh.pa.us> <20180907225643.GI28811@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Fri, 07 Sep 2018 18:56:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28550.1536361539.1@sss.pgh.pa.us> Date: Fri, 07 Sep 2018 19:05:39 -0400 Message-ID: <28551.1536361539@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > On Fri, Sep 7, 2018 at 06:43:52PM -0400, Tom Lane wrote: >> AFAICS there are no internal-to-the-C-code search path dependencies >> in earthdistance.c, so it's not the same problem. > Uh, there is an SQL function that calls functions from the module that > fail. It would be a CREATE FUNCTION patch, I think, but I thought the > issue was the same. Not really. You could either interpolate @extschema@ into the text of the referencing function, or (though much inferior for performance) have it SET SEARCH_PATH FROM CURRENT. Either of those changes would involve an extension version bump since they're changing the extension script. What's more of a problem is that we could no longer claim the extension is relocatable. My unaccent fix dodged that by looking up the C function's current schema, but I don't think there's any equivalent functionality available at SQL level. regards, tom lane