[prev in list] [next in list] [prev in thread] [next in thread]
List: pgsql-bugs
Subject: [BUGS] psql \d command hides objects from "lower" schemas
From: Ben Morgan <neembi () gmail ! com>
Date: 2013-01-23 13:21:33
Message-ID: CA+pT-SXsWU1j8oyBJBb3TCmL6bMFUop=Or5nuPKFgz=9-ysvCA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
*Version and Operating System:*
PostgreSQL 9.2.2 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.7.2, 32-bit
PostgreSQL 9.2.2, compiled by Visual C++ build 1600, 32-bit
*Description of Bug:*
I attached a file *input.sql* which contains a few commands necessary for
bug report. In summary:
create schema front, back;
set search_path to front,back,public;
create table back.some_table (...);
create view front.some_table ...;
create table {public,back,front}.another (...);
\d
Given this, when using the psql command \d, I expect to see all the tables,
and the view as well as the table. But instead the objects in the
front-most schema mask the other objects.
I'm submitting this as a bug, because it seems to be one. If this behavior
is intended, please forgive me! (And if it is intended, is there flag to
make objects in higher schemas *not* mask other objects?)
*Steps to reproduce bug:*
$ createdb -U postgres -O benmorgan bugreport
$ psql bugreport < bugreport-input.sql
$ psql bugreport
psql (9.2.2)
Type "help" for help.
bugreport=>\d
List of relations
Schema | Name | Type | Owner
--------+-------------------+----------+-----------
back | some_table_id_seq | sequence | benmorgan
front | another | table | benmorgan
front | another_id_seq | sequence | benmorgan
front | some_table | view | benmorgan
(4 rows)
Thanks!
-Ben
[Attachment #5 (text/html)]
<div dir="ltr"><div style><b style="font-family:'courier \
new',monospace">Version and Operating System:</b><br></div><span \
style="font-family:'courier new',monospace">PostgreSQL 9.2.2 on \
i686-pc-linux-gnu, compiled by gcc (GCC) 4.7.2, 32-bit</span><div> <div><font \
face="courier new, monospace">PostgreSQL 9.2.2, compiled by Visual C++ build 1600, \
32-bit</font></div><div><font face="courier new, monospace"><br></font></div><div \
style><font face="courier new, monospace"><b>Description of Bug:</b></font></div> \
<div style><font face="courier new, monospace">I attached a file <b>input.sql</b> \
which contains a few commands necessary for bug report. In summary:</font></div><div \
style><font face="courier new, monospace"><br></font></div> <div style><font \
face="courier new, monospace"> create schema front, back;</font></div><div \
style><font face="courier new, monospace"> set search_path to \
front,back,public;</font></div><div style><font face="courier new, monospace"> \
create table back.some_table (...);</font></div> <div style><font face="courier new, \
monospace"> create view front.some_table ...;</font></div><div style><font \
face="courier new, monospace"> create table {public,back,front}.another \
(...);</font></div><div style><font face="courier new, monospace"> \
\d</font></div> <div style><font face="courier new, monospace"><br></font></div><div \
style><font face="courier new, monospace">Given this, when using the psql command \d, \
I expect to see all the tables, and the view as well as the table. But instead the \
objects in the front-most schema mask the other objects.</font></div> <div \
style><font face="courier new, monospace"><br></font></div><div style><font \
face="courier new, monospace">I'm submitting this as a bug, because it seems to \
be one. If this behavior is intended, please forgive me! (And if it is intended, is \
there flag to make objects in higher schemas <b>not</b> mask other \
objects?)</font></div> <div><font face="courier new, \
monospace"><br></font></div><div><font face="courier new, monospace"><b>Steps to \
reproduce bug:</b></font></div><div><font face="courier new, \
monospace"><br></font></div><div><font face="courier new, monospace"> $ createdb \
-U postgres -O benmorgan bugreport</font></div> <div><font face="courier new, \
monospace"> $ psql bugreport < bugreport-input.sql</font></div><div><font \
face="courier new, monospace"> $ psql bugreport</font></div><div><font \
face="courier new, monospace"> psql (9.2.2)</font></div> <div><font \
face="courier new, monospace"> Type "help" for \
help.</font></div><div><font face="courier new, \
monospace"><br></font></div><div><font face="courier new, monospace"> \
bugreport=>\d</font></div> <div><font face="courier new, monospace"> \
List of relations</font></div><div><font face="courier new, monospace"> Schema \
| Name | Type | Owner </font></div><div><font \
face="courier new, monospace"> \
--------+-------------------+----------+-----------</font></div> <div><font \
face="courier new, monospace"> back | some_table_id_seq | sequence | \
benmorgan</font></div><div><font face="courier new, monospace"> front | \
another | table | benmorgan</font></div><div> <font face="courier \
new, monospace"> front | another_id_seq | sequence | \
benmorgan</font></div><div><font face="courier new, monospace"> front | \
some_table | view | benmorgan</font></div><div><font face="courier \
new, monospace"> (4 rows)</font></div> </div><div><br></div><div style><font \
face="courier new, monospace">Thanks!</font></div><div style><font face="courier new, \
monospace"><br></font></div><div style><font face="courier new, \
monospace">-Ben</font></div></div>
["bugreport-input.sql" (application/octet-stream)]
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic