Skip site navigation (1) Skip section navigation (2)

unable to see other schemas besides public

From: Gabriel Ramirez <gabrielramirez(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: unable to see other schemas besides public
Date: 2007-11-25 01:05:24
Message-ID: 782137.3758.qm@web31902.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

in a database I created a schema, but as superuser or as an user of that
schema I'm unable to see a listing of the schema contents. I'm running
postgresql 8.2.5, compiled via macports under Mac OS X 10.4.10 commands
and output follows:

soporte_misc=# create  schema test1;
CREATE SCHEMA
soporte_misc=# create table test1.mytable (
  username varchar(64),
  rolename text
);
CREATE TABLE
soporte_misc=# \z
                       Access privileges for database "soporte_misc"
 Schema |          Name          |   Type   |               Access
privileges
-
--------+------------------------+----------+-----------------------------------------------
 public | numero_en_letra        | table    |
{postgres=arwdxt/postgres,myuser=r/postgres}
 public | numero_en_letra_id_seq | sequence |
(2 rows)

I was expecting the test1.mytable listed above

soporte_misc=# \z test1
Access privileges for database "soporte_misc"
 Schema | Name | Type | Access privileges
- --------+------+------+-------------------
(0 rows)

soporte_misc=# \z test1.mytable
Access privileges for database "soporte_misc"
 Schema |  Name   | Type  | Access privileges
- --------+---------+-------+-------------------
 test1  | mytable | table |
(1 row)

with \dt:

soporte_misc=# \dt
              List of relations
 Schema |      Name       | Type  |  Owner
- --------+-----------------+-------+----------
 public | numero_en_letra | table | postgres
(1 row)

soporte_misc=# \dt test1
No matching relations found.
soporte_misc=# \dt test1.mytable
          List of relations
 Schema |  Name   | Type  |  Owner
- --------+---------+-------+----------
 test1  | mytable | table | postgres
(1 row)

now creating one index:

soporte_misc=# create index myindex on test1.mytable(username);
CREATE INDEX

soporte_misc=# \di
No relations found.
soporte_misc=# \di test1
No matching relations found.
soporte_misc=# \di test1.myindex
               List of relations
 Schema |  Name   | Type  |  Owner   |  Table
- --------+---------+-------+----------+---------
 test1  | myindex | index | postgres | mytable
(1 row)

soporte_misc=#

so seems if one don't specified the schemaname.objects to list the
database don't return them, or maybe I'm missing a step after creating
the schema and objects to be able to list them.

granting all privileges on the schema and objects don't change the
output above. only once I was able to see the schemas and objects with a
normal user account (existing only in postgres) but now I'm unable to
reproduce that.

thanks in advance,


Gabriel






      ____________________________________________________________________________________
Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  http://overview.mail.yahoo.com/

pgsql-bugs by date

Next:From: Euler Taveira de OliveiraDate: 2007-11-25 10:24:24
Subject: Re: unable to see other schemas besides public
Previous:From: Gabriel RamirezDate: 2007-11-25 01:04:38
Subject: unable to see other schemas besides public

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group