Skip site navigation (1) Skip section navigation (2)

SET search_path = value

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SET search_path = value
Date: 2010-04-19 02:43:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
Hi developers!

Just created a ticket concerning a minor error in the reverse engineered 
SQL code for roles

Besides the example ...
     ALTER ROLE SET search_path = test, public;
--> ALTER DATABASE test SET search_path='test, public';    -- quotes are 
... there are at least two more occurrances:

_If_ you wanted to quote the schema names, it would have to be quotes 
around _each_ schema in the list, like so:
     ALTER DATABASE test SET search_path = 'test', 'public';
But that would lead to another pitfall. This does not work as intended:
     ALTER DATABASE test SET search_path = '"$user", public';
So, best not to add single quotes at all:
     ALTER DATABASE test SET search_path ="$user", public;

The official docs on the matter are also misleading, IMO.
I've sent a comment on the website.



pgadmin-hackers by date

Next:From: Dave PageDate: 2010-04-19 11:03:02
Subject: Re: Ticket 3: groups of servers
Previous:From: pgAdmin TracDate: 2010-04-19 01:57:56
Subject: Re: [pgAdmin III] #169: SET search_path = value

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group