pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15530: unable restore index on function from earthdistance contrib
Date: Mon, 03 Dec 2018 10:11:54 -0500
Message-ID: <17735.1543849914@sss.pgh.pa.us> (raw)
In-Reply-To: <877egq4q16.fsf@news-spur.riddles.org.uk>
References: <15530-3dc5f66205393dc0@postgresql.org>
	<a1ef1a29-8e56-2183-1ba1-ba3f1319ba65@zsrv.org>
	<877egq4q16.fsf@news-spur.riddles.org.uk>

Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Sergei" == Sergei Kornilov <sk@zsrv.org> writes:
>  Sergei> I think we can fix this issue by marking SQL language functions
>  Sergei> "set search_path from current".

> Unfortunately using SET on sql-language functions prevents inlining.

Yeah.  Another problem is that SET FROM CURRENT will freeze the
search_path at the current setting, which means it'll likely
fail again if either extension in question gets relocated.

Even if this were a perfect solution, it only fixes things for
earthdistance, whereas the same problem exists for any extension
containing SQL or PL functions.  So I wish we had a more general
answer ... not that I know what that should look like.

			regards, tom lane




view thread (4+ messages)

Message-ID: <17735.1543849914@sss.pgh.pa.us>
Permalink:  ../17735.1543849914@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17735.1543849914@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@tao11.riddles.org.uk, sk@zsrv.org
  Subject: Re: BUG #15530: unable restore index on function from earthdistance contrib
  In-Reply-To: <17735.1543849914@sss.pgh.pa.us>
  References: <15530-3dc5f66205393dc0@postgresql.org> <a1ef1a29-8e56-2183-1ba1-ba3f1319ba65@zsrv.org> <877egq4q16.fsf@news-spur.riddles.org.uk> <17735.1543849914@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