Re: vacuumdb -Z can't find function declared on functional index with inline sql function - Mailing list pgsql-bugs

From Jaime Soler
Subject Re: vacuumdb -Z can't find function declared on functional index with inline sql function
Date
Msg-id CAKVUGgRFCksFgg5NWgtesWTUOPxiBbEUYXLwRRvJkPpDGz7Yng@mail.gmail.com
Whole thread Raw
In response to Re: vacuumdb -Z can't find function declared on functional index with inline sql function  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: vacuumdb -Z can't find function declared on functional index with inline sql function
List pgsql-bugs
thanks Alvaro, I don't know why I suppose that prior releases of vacuumdb will use the user's search_path . 

El jue, 19 nov 2020 a las 19:48, Alvaro Herrera (<alvherre@alvh.no-ip.org>) escribió:
On 2020-Nov-19, Jaime Soler wrote:


> CREATE OR REPLACE FUNCTION public.tecnologia_index_func(nombre character
> varying, tipotec bigint)
>      RETURNS text
>      LANGUAGE sql
>      IMMUTABLE
>     AS $function$
>     select tipotec || '_' || upper(sinacentos(trim(nombre)));
>     $function$

This should be fixable by either schema-qualifying function
'sinacentos', or adding a SET search_path clause to the function.

 CREATE OR REPLACE FUNCTION public.tecnologia_index_func(nombre character
 varying, tipotec bigint)
      RETURNS text
      LANGUAGE sql
      IMMUTABLE
     AS $function$
     select tipotec || '_' || upper(public.sinacentos(trim(nombre)));
     $function$;

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16730: Create table like with inheritance and self referencing index
Next
From: "David G. Johnston"
Date:
Subject: Re: vacuumdb -Z can't find function declared on functional index with inline sql function