From: Tom Lane <tgl@sss.pgh.pa.us>
To: william.burke@collins.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16023: in PgAdmin4.13, unable to recompile functions that have "search_path" set at the function level
Date: Wed, 25 Sep 2019 18:25:54 -0400
Message-ID: <27990.1569450354@sss.pgh.pa.us> (raw)
In-Reply-To: <16023-c7ad13c78c572572@postgresql.org>
References: <16023-c7ad13c78c572572@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> PostgreSQL version: 9.4.0
> Sample Function as shown in pgAdmin4.13:
> CREATE OR REPLACE FUNCTION schema1.function1(
> parameter1 text,
> parameter2 text,
> parameter3 text)
> RETURNS record
> LANGUAGE 'plpgsql'
> COST 100
> VOLATILE SECURITY DEFINER
> SET search_path='schema1, pg_temp'
> AS $BODY$
> DECLARE
> v_typeValue customType;
If this is really a 9.4.0 server, updating might help this, as
there were relevant fixes in 9.4.18 and again in 9.4.19.
(Not to mention all the other bug fixes you're missing.)
I get sane-looking behavior in 9.4.24:
regression=# create function foo() returns int as 'select 1' language sql;
CREATE FUNCTION
regression=# alter function foo() SET search_path=schema1, pg_temp;
ALTER FUNCTION
regression=# \sf foo()
CREATE OR REPLACE FUNCTION public.foo()
RETURNS integer
LANGUAGE sql
SET search_path TO 'schema1', 'pg_temp'
AS $function$select 1$function$
regression=# \q
Now, psql's \sf depends on pg_get_functiondef(), but I don't know
whether pgAdmin does or not. So it may be that the quoting foulup is
actually pgAdmin's fault, in which case you need to complain on
the pgadmin lists. This list is just for bugs in core Postgres.
regards, tom lane
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, william.burke@collins.com
Subject: Re: BUG #16023: in PgAdmin4.13, unable to recompile functions that have "search_path" set at the function level
In-Reply-To: <27990.1569450354@sss.pgh.pa.us>
References: <16023-c7ad13c78c572572@postgresql.org> <27990.1569450354@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