From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general General <pgsql-general@postgresql.org>
Subject: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
Date: Mon, 30 Jul 2018 15:57:02 +0300
Message-ID: <b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com> (raw)
This is with PostgreSQL 10.4.
How to reproduce :
postgres@smadev:~% psql
psql (10.4)
Type "help" for help.
Alter the role for search path :
dynacom=# ALTER ROLE amura3 SET search_path TO "$user", amuragents, public;
ALTER ROLE
dynacom=#
Verify :
postgres@smadev:~% psql -U amura3
Password for user amura3:
psql (10.4)
Type "help" for help.
dynacom=> show search_path ;
search_path
---------------------------
$user, amuragents, public
(1 row)
dynacom=>
pg_dumpall's output :
ALTER ROLE amura3 SET search_path TO $user, amuragents, public;
psql -f pg_dumpall_out.sql :
dynacom=# ALTER ROLE amura3 SET search_path TO $user, amuragents, public;
ERROR: syntax error at or near "$"
Is this a bug or am I missing something ?
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
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-general@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
In-Reply-To: <b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com>
References: <b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com>
* 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