Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>,
Adrian Klaver <adrian.klaver@aklaver.com>,
pgsql-hackers@lists.postgresql.org
Date: 2018-09-07T23:05:39Z
Lists: pgsql-hackers, pgsql-general
Bruce Momjian <bruce@momjian.us> 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
Commits
-
Make contrib/unaccent's unaccent() function work when not in search path.
- d4ab3962613f 9.4.20 landed
- c79b39fb1c5b 9.5.15 landed
- a54f5b187a4a 10.6 landed
- a5322ca10fa1 12.0 landed
- 594ee1ada5bc 9.6.11 landed
- 25ff97ba77cb 9.3.25 landed
- 23aad181f447 11.0 landed
-
Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers.
- fb8697b31aae 11.0 cited