Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fk8dA-000489-Vn for pgsql-general@arkaria.postgresql.org; Mon, 30 Jul 2018 13:54:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fk8d8-00066N-EL for pgsql-general@arkaria.postgresql.org; Mon, 30 Jul 2018 13:54:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fk8d8-00066F-6C for pgsql-general@lists.postgresql.org; Mon, 30 Jul 2018 13:54:34 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fk8d5-0007VI-Pj for pgsql-general@lists.postgresql.org; Mon, 30 Jul 2018 13:54:33 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id w6UDsOWK000804 for ; Mon, 30 Jul 2018 16:54:29 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id w6UDsOTt091387 for ; Mon, 30 Jul 2018 16:54:24 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" . To: pgsql-general@lists.postgresql.org References: <25259.1532958693@sss.pgh.pa.us> From: Achilleas Mantzios Message-ID: <3632eeb3-d655-606c-ce31-c3035043a5b1@matrix.gatewaynet.com> Date: Mon, 30 Jul 2018 16:54:24 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <25259.1532958693@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.98.7 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-38.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_IT_PARTNERS,DYN_HAM_NAUTICAL,DYN_HAM_SIGNAT1 autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 30/07/2018 16:51, Tom Lane wrote: > Achilleas Mantzios writes: >> This is with PostgreSQL 10.4. >> How to reproduce : >> dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public; >> ALTER ROLE >> ... >> dynacom=> show search_path ; >>         search_path >> --------------------------- >>  $user, amuragents, public >> (1 row) > Hm, that's not happening for me: You (and Adrian) are right. This is due to our own tweaking (which I had forgotten). Sorry for the false alarm. > > regression=# alter user joe set search_path to "$user", public; > ... > regression=> show search_path ; > search_path > ----------------- > "$user", public > (1 row) > > and then pg_dumpall produces > > ALTER ROLE joe SET search_path TO "$user", public; > > There was a relevant bug fix in March (commit 742869946) ... > are you certain this is a 10.4 server, and not 10.3 or older? > > regards, tom lane > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt