Re: Quoting $user as Parameter to SET

From: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Quoting $user as Parameter to SET
Date: 2005-07-12 01:12:19
Message-ID: 4FFD144C-B2CD-49FA-99A5-2647744BC5E1@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Uh...

Just kidding, I guess. Wish I had a screen capture of what I had done
before because I swear I was unable to create a table in the user
namespace after having created it. But now that I look more closely
(including when running current_schemas(true)), everything looks fine.

Sorry for the noise...

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC

Strategic Open Source: Open Your i™

http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jul 11, 2005, at 6:04 PM, Tom Lane wrote:

> "Thomas F. O'Connell" <tfo(at)sitening(dot)com> writes:
>
>> This is an important distinction because testing reveals that the
>> quoted $user after the reversal is no longer actually a dynamic
>> variable that results in a search_path that resolves to the current
>> user.
>>
>
> Really? It works fine for me:
>
> regression=# create schema postgres;
> CREATE SCHEMA
> regression=# show search_path;
> search_path
> --------------
> $user,public
> (1 row)
>
> regression=# select current_schemas(true);
> current_schemas
> ------------------------------
> {pg_catalog,postgres,public}
> (1 row)
>
> regression=# alter database regression set search_path = public,
> '$user';
> ALTER DATABASE
> regression=# \c -
> You are now connected to database "regression".
> regression=# show search_path;
> search_path
> -----------------
> public, "$user"
> (1 row)
>
> regression=# select current_schemas(true);
> current_schemas
> ------------------------------
> {pg_catalog,public,postgres}
> (1 row)
>
> regression=#
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message TJ O'Donnell 2005-07-12 03:16:17 dynamically loaded functions
Previous Message Joseph Shraibman 2005-07-11 23:54:08 Re: table locking and SELECT FOR UPDATE