Re: Dump/Reload broken with relocatable extensions

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Dump/Reload broken with relocatable extensions
Дата
Msg-id 523C02C9.9010503@dalibo.com
обсуждение исходный текст
Ответ на Re: Dump/Reload broken with relocatable extensions  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On 09/19/2013 11:40 PM, Dimitri Fontaine wrote:
> Vik Fearing <vik.fearing@dalibo.com> writes:
>> I don't know if this has been discussed before, a cursory search of the
>> archives didn't turn up anything interesting.  I perhaps didn't put in
>> the right keywords.
> For others not to spend too much time on this: it seems like a problem
> with the extension not abiding by the rules about its relocatable
> property and the @extschema@ thingy.
>
>   http://www.postgresql.org/docs/9.3/static/extend-extensions.html#AEN54999

I can't get this to work.  If I modify my function to be

CREATE FUNCTION no_accents(text)   RETURNS boolean   AS 'select $1 = unaccent($1);'   LANGUAGE sql STABLE STRICT   SET
search_path= '@extschema@';
 

then I get

d=# create extension unaccent;
ERROR:  function unaccent(text) does not exist
LINE 1: select $1 = unaccent($1);                   ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.
QUERY:  select $1 = unaccent($1);


If I modify it to be

CREATE FUNCTION no_accents(text)   RETURNS boolean   AS 'select $1 = unaccent($1);'   LANGUAGE sql STABLE STRICT;
ALTER FUNCTION no_accents(text) SET search_path = '@extschema@';

then I get the same restore problem I originally described.

What am I doing wrong?

-- 
Vik




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Minor inheritance/check bug: Inconsistent behavior
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: pg_stat_statements: calls under-estimation propagation