ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
Date: 2018-07-30 12:57:02
Message-ID: b834e08c-fa94-5823-932e-2073ea805e98@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

This is with PostgreSQL 10.4.
How to reproduce :
postgres(at)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(at)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-07-30 13:23:41 Re: ALTER ROLE SET search_path produced by pg_dumpall gives : ERROR: syntax error at or near "$" .
Previous Message vardenis pavardenis 2018-07-30 07:40:10 Re: Postgresql 10.4 installation issues on Ubuntu 14.05