Tom Lane wrote:
> Bruce Momjian <> writes:
> > Agreed.  I have gotten confused on how to set $user in the past.  I have
> > developed the following patch that sets the default with the double
> > quotes around it, and it works fine.  The patch also contains updated
> > documentation.
> This is really entirely irrelevant to Greg's complaint.  To respond to
> that, you'd have to modify the behavior of SHOW.

Uh, SHOW does show the quotes:

        test=> show search_path;
        (1 row)

and that can be fed right into SET:

        test=> set search_path = "$user",public;

I thought that was the goal.

> Actually, it seems that this exposes a bug in the search_path code: if
> I wrote what you wrote, I'd really expect that it refers to a schema
> named exactly $user --- the quoting ought to suppress the substitution,
> one would think.  Not sure how hard or easy that might be to implement
> though ...

I am unsure if the quotes are suppose to still allow dollar expansion. 
It does in shell scripts.  Actually this is kind of unusual:

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

It converts the single quotes to double.

  Bruce Momjian                        |               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to