Re: BUG #15530: unable restore index on function from earthdistance contrib

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15530: unable restore index on function from earthdistance contrib
Date: 2018-12-03 15:11:54
Message-ID: 17735.1543849914@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "Sergei" == Sergei Kornilov <sk(at)zsrv(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message 小威 2018-12-04 02:47:57 Re: BUG #15528: on v11.0 version still get error "ERROR: catalog is missing 1 attribute(s) for relid 6855092"
Previous Message Andrew Gierth 2018-12-03 14:57:25 Re: BUG #15530: unable restore index on function from earthdistance contrib