Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Gunnlaugur Thor Briem <gunnlaugur(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)
Date: 2018-09-07 23:05:39
Message-ID: 28551.1536361539@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2018-09-08 02:15:59 Re: pgbackrest when data/base is symlinked to another volume
Previous Message Bruce Momjian 2018-09-07 22:56:43 Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikita Glukhov 2018-09-07 23:21:27 Re: jsonpath
Previous Message Bruce Momjian 2018-09-07 22:56:43 Re: unaccent(text) fails depending on search_path (WAS: pg_upgrade fails saying function unaccent(text) doesn't exist)