Re: Postgres not finding tables - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres not finding tables
Date
Msg-id 7082.973272551@sss.pgh.pa.us
Whole thread Raw
In response to RE: Postgres not finding tables  (James Hall <James.Hall@RadioShack.com>)
List pgsql-general
James Hall <James.Hall@RadioShack.com> writes:
> Recently I noticed that postgres gives the error:
> "Couldn't find any tables, sequences or indices!"
> whenever I tried '\d' or '\d*' on one of the machines.  BUT the
> database DOES contain tables because I can execute
> 'select * from testtable;' and postgres will display the table info.

(checks 6.5 psql sources...)  Back then, \d expanded to a query like

    SELECT usename, relname, relkind, relhasrules
    FROM pg_class, pg_user
    WHERE usesysid = relowner AND (other conditions)

This will miss any tables for which there is no matching owner listed
in pg_user.  I'm guessing that's your problem ... how you got into that
state I don't know, but look at table ownership.

            regards, tom lane

pgsql-general by date:

Previous
From: James Hall
Date:
Subject: RE: Postgres not finding tables
Next
From: Igor Khanjine
Date:
Subject: Re[2]: DateTime functions