Re: SET search_path = value - Mailing list pgadmin-hackers

From Guillaume Lelarge
Subject Re: SET search_path = value
Date
Msg-id 4BCCD13C.8040300@lelarge.info
Whole thread Raw
In response to SET search_path = value  (Erwin Brandstetter <brandstetter@falter.at>)
Responses Re: SET search_path = value  (Euler Taveira de Oliveira <euler@timbira.com>)
List pgadmin-hackers
Le 19/04/2010 04:43, Erwin Brandstetter a écrit :
> 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
> wrong
> ... there are at least two more occurrances:
>     ALTER FUNCTION ...
>     ALTER DATABASE ...
>
> _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.
> http://www.postgresql.org/docs/8.4/interactive/runtime-config-client.html
> I've sent a comment on the website.
>

pgAdmin shouldn't use quotes on some parameters: search_path,
temp_tablespaces. Perhaps others. I don't find a way to pick them
automatically. For example, their vartype are "string". Which is quite
ambiguous with others "string" parameters like archive_command. Of
course, we can use a specific code for them. It would be really easy,
but I would prefer to find another way.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

pgadmin-hackers by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: pgadmin 1.10.2 crashes on start
Next
From: Euler Taveira de Oliveira
Date:
Subject: Re: SET search_path = value