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