Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDFjd-0000Fk-RT for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Sep 2019 22:26:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDFja-0006Qk-V0 for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Sep 2019 22:26:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDFja-0006QR-L4 for pgsql-bugs@lists.postgresql.org; Wed, 25 Sep 2019 22:26:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDFjT-0006s0-Ik for pgsql-bugs@lists.postgresql.org; Wed, 25 Sep 2019 22:26:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8PMPstX027991; Wed, 25 Sep 2019 18:25:54 -0400 From: Tom Lane 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 In-reply-to: <16023-c7ad13c78c572572@postgresql.org> References: <16023-c7ad13c78c572572@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 25 Sep 2019 21:13:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27989.1569450354.1@sss.pgh.pa.us> Date: Wed, 25 Sep 2019 18:25:54 -0400 Message-ID: <27990.1569450354@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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