pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: 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)
Date: Fri, 07 Sep 2018 19:05:39 -0400
Message-ID: <28551.1536361539@sss.pgh.pa.us> (raw)
In-Reply-To: <20180907225643.GI28811@momjian.us>
References: <20180829190635.GD25450@momjian.us>
	<CAPs+M8KRP3McWzVwU1hs9QZXsUHXbb7RSgtshqcy4NwDgW0VHg@mail.gmail.com>
	<6c73c320-95b7-c259-e309-c46300557852@aklaver.com>
	<CAPs+M8KpVH0mm5N1T7Qf5TiwkSF8se3Aadu3RwDbJZwAexC5zw@mail.gmail.com>
	<6e023cde-943a-5cea-8626-f1e9b29695df@aklaver.com>
	<CAPs+M8LYh1fmuU8=yG21nyAuZOOY22EGZsMCwWPH8TLhOqK9tg@mail.gmail.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>

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




view thread (9+ messages)

Message-ID: <28551.1536361539@sss.pgh.pa.us>
Permalink:  ../28551.1536361539@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28551.1536361539@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, gunnlaugur@gmail.com, adrian.klaver@aklaver.com, 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: <28551.1536361539@sss.pgh.pa.us>
  References: <20180829190635.GD25450@momjian.us> <CAPs+M8KRP3McWzVwU1hs9QZXsUHXbb7RSgtshqcy4NwDgW0VHg@mail.gmail.com> <6c73c320-95b7-c259-e309-c46300557852@aklaver.com> <CAPs+M8KpVH0mm5N1T7Qf5TiwkSF8se3Aadu3RwDbJZwAexC5zw@mail.gmail.com> <6e023cde-943a-5cea-8626-f1e9b29695df@aklaver.com> <CAPs+M8LYh1fmuU8=yG21nyAuZOOY22EGZsMCwWPH8TLhOqK9tg@mail.gmail.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> <28551.1536361539@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox