From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | frank(dot)messie(at)osix(dot)nl |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: user name doesn't seem to resolve to $user in search_path |
Date: | 2003-10-16 17:29:53 |
Message-ID: | 11938.1066325393@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
frank(dot)messie(at)osix(dot)nl writes:
> I have a problem with the following.
> I start psql as user "testusr" in database "testdb"
> In the database I have created a schema with the name of a user
> CREATE SCHEMA testusr ;
> The search_path is the default $user,public
> Then I create a table
> CREATE TABLE test (name char(8)) ;
> Now I get the error message "No namespace have been selected to create
> in".
This sounds like the search path didn't get recomputed when you created
the new schema, but I cannot reproduce any such problem:
regression=# create user tstuser;
CREATE USER
regression=# grant create on database regression to tstuser;
GRANT
regression=# \c - tstuser
You are now connected as new user "tstuser".
regression=> select current_schemas(true);
current_schemas
---------------------
{pg_catalog,public}
(1 row)
regression=> create schema tstuser;
CREATE SCHEMA
regression=> CREATE TABLE test (name char(8)) ;
CREATE TABLE
regression=> \dt test
List of relations
Schema | Name | Type | Owner
---------+------+-------+---------
tstuser | test | table | tstuser
(1 row)
regression=> select current_schemas(true);
current_schemas
-----------------------------
{pg_catalog,tstuser,public}
(1 row)
Are you sure you spelled the schema name the same as the user name?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff | 2003-10-16 17:37:27 | Re: [PERFORM] backup/restore - another area. |
Previous Message | Josh Berkus | 2003-10-16 17:09:27 | Re: [PERFORM] backup/restore - another area. |