tables are not listable by \dt

Started by Rajarshi Guhaalmost 19 years ago5 messagesgeneral
Jump to latest
#1Rajarshi Guha
rguha@indiana.edu

Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2 by
doing a dump and restore. Howveer after logging into the database (as
a user that is not the superuser) and doing \dt I get the error:

No relations found

But when I do

SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;

I get a list of the tables and their sizes.

I'm not even sure where to begin looking for the solution and any
pointers would be much appreciated.

-------------------------------------------------------------------
Rajarshi Guha <rguha@indiana.edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
A mathematician is a device for turning coffee into theorems.
-- P. Erdos

#2Michael Fuhr
mike@fuhr.org
In reply to: Rajarshi Guha (#1)
Re: tables are not listable by \dt

On Mon, Jul 02, 2007 at 10:04:21AM -0400, Rajarshi Guha wrote:

Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2 by
doing a dump and restore. Howveer after logging into the database (as
a user that is not the superuser) and doing \dt I get the error:

No relations found

But when I do

SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;

I get a list of the tables and their sizes.

Are the tables in schemas that are in your search_path?

--
Michael Fuhr

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rajarshi Guha (#1)
Re: tables are not listable by \dt

Rajarshi Guha <rguha@indiana.edu> writes:

Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2 by
doing a dump and restore. Howveer after logging into the database (as
a user that is not the superuser) and doing \dt I get the error:
No relations found
But when I do
SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
I get a list of the tables and their sizes.

\dt does joins to pg_roles and pg_namespace ... are those nonempty?
What have you got search_path set to?

regards, tom lane

#4Mikko Partio
mpartio@gmail.com
In reply to: Rajarshi Guha (#1)
Re: tables are not listable by \dt

On 7/2/07, Rajarshi Guha <rguha@indiana.edu> wrote:

Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2 by
doing a dump and restore. Howveer after logging into the database (as
a user that is not the superuser) and doing \dt I get the error:

No relations found

Are you using the 8.2 version of psql?

Regards

MP

#5Rajarshi Guha
rguha@indiana.edu
In reply to: Rajarshi Guha (#1)
Re: tables are not listable by \dt

On Jul 2, 2007, at 10:04 AM, Rajarshi Guha wrote:

Hi, we recently upgraded our Postgres instllation from 7.4 to 8.2
by doing a dump and restore. Howveer after logging into the
database (as a user that is not the superuser) and doing \dt I get
the error:

No relations found

But when I do

SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;

I get a list of the tables and their sizes.

Thanks to posters - it was indeed an error with the search path.

-------------------------------------------------------------------
Rajarshi Guha <rguha@indiana.edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
If you don't get a good night kiss, you get Kafka dreams."
-Hobbes