Jie Liang wrote:
####I expect to see something like:
List of relations
Schema | Name | Type | Owner
--------+------+-------+-------
public | foo | table | robot
t | foo | table | robot
That's because schema t is not in your search path. By default,search path is:
regression=# show search_path ;
search_path
--------------
$user,public
(1 row)
So you are not seeing the table in schema foo. If you do:
regression=# create user robot;
CREATE USER
regression=# create schema t AUTHORIZATION robot;
CREATE SCHEMA
regression=# drop table foo;
DROP TABLE
regression=# create table foo(test text);
CREATE TABLE
regression=# create table t.foo(test text);
CREATE TABLE
regression=# \dt
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
public | foo | table | postgres
public | table1 | table | postgres
public | table2 | table | postgres
(3 rows)
regression=# set search_path to 't','public';
SET
regression=# \dt
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
public | table1 | table | postgres
public | table2 | table | postgres
t | foo | table | postgres
(3 rows)
The $user in the default search path allows user robot to automatically find objects in schema robot first.
You can change the default search path for the installation in postgresql.conf, or you can change in via ALTER DATABASE or ALTER USER to be effective in just one database or for one user respectively.
HTH,
Joe
---------------------------(end of broadcast)---------------------------
TIP 3: 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
