Re: Disparity in search_path SHOW and SET

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Greg Sabino Mullane <greg@turnstep.com>, PostgreSQL-patches <pgsql-patches@postgresql.org>
Date: 2005-12-23T00:26:36Z
Lists: pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Uh, SHOW does show the quotes:

> 	test=> show search_path;
> 	  search_path
> 	----------------
> 	 "$user",public
> 	(1 row)

Hmm ... you're right, it does, so the current default is actually a
value that you can't get into the variable by a normal SET.
Interesting.  (We are doing the "smart" stuff during SET not SHOW,
it appears.)

regression=# show search_path ;
 search_path
--------------
 $user,public
(1 row)

regression=# set search_path = '$user',public;
SET
regression=# show search_path ;
   search_path
-----------------
 "$user", public
(1 row)

Given that, I agree with changing the default string.  It should look
the same as a value that you could actually assign ...

			regards, tom lane