did not find any relation for existing table

Started by Sinead O Brienalmost 19 years ago9 messagesgeneral
Jump to latest
#1Sinead O Brien
reapersoul@hotmail.com

Hello

I am receiving a "did not find any relation" error in pgsql for a table
which I know exists. The outputs from the commands are as follows

cdx_post=# \d history.client;
Did not find any relation named "history.client".

cdx_post=# \dt history.clien*
List of relations
Schema | Name | Type | Owner
---------+-----------------+-------+-------
history | client | table | pgsql
history | client_activity | table | pgsql
history | client_flag | table | pgsql

cdx_post=# \d history.clien*
Table "history.client"
Column | Type |
Modifiers--------------------------------+--------------------------------+--------------------------
order_id | integer | not null
history_id | integer | not null
active | boolean |
client_id | character varying(32) | not null

So, the table is there, but I can't access it using its name. Any
suggestions would be greatly appreciated.

Thank you and Regards,
Sinead O Brien

_________________________________________________________________
Message offline contacts without any fire risk!
http://www.communicationevolved.com/en-ie/

In reply to: Sinead O Brien (#1)
Re: did not find any relation for existing table

On 06/05/2007 23:05, Sinead O Brien wrote:

cdx_post=# \d history.client;
Did not find any relation named "history.client".

Without actually trying it out myself, I wonder if the final semi-colon
on your command is causing problems - as far as I recall (I don't use
psql a whole lot), you need the semicolon for actual SQL but not for the
various "backslash" commands.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------

#3Sinead O Brien
reapersoul@hotmail.com
In reply to: Raymond O'Donnell (#2)
Re: did not find any relation for existing table

Removing the semicolon gives the same output.

cdx_post=# \d history.client
Did not find any relation named "history.client".

Without actually trying it out myself, I wonder if the final semi-colon on
your command is causing problems - as far as I recall (I don't use psql a
whole lot), you need the semicolon for actual SQL but not for the various
"backslash" commands.

_________________________________________________________________
Make free PC-to-PC calls with no loss of life!
http://www.communicationevolved.com/en-ie/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Sinead O Brien (#1)
Re: did not find any relation for existing table

"Sinead O Brien" <reapersoul@hotmail.com> writes:

I am receiving a "did not find any relation" error in pgsql for a table
which I know exists.

Hm, what PG version is this? It might be that reindexing pg_class will
fix it, but it would be nice to try to determine what's wrong before
overwriting the evidence.

regards, tom lane

#5Sinead O Brien
reapersoul@hotmail.com
In reply to: Tom Lane (#4)
Re: did not find any relation for existing table

"Sinead O Brien" <reapersoul@hotmail.com> writes:

I am receiving a "did not find any relation" error in pgsql for a table
which I know exists.

Hm, what PG version is this? It might be that reindexing pg_class will
fix it, but it would be nice to try to determine what's wrong before
overwriting the evidence.

Thanks for the response, version is
psql (PostgreSQL) 8.0.3

_________________________________________________________________
Message offline contacts without any fire risk!
http://www.communicationevolved.com/en-ie/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Sinead O Brien (#5)
Re: did not find any relation for existing table

"Sinead O Brien" <reapersoul@hotmail.com> writes:

I am receiving a "did not find any relation" error in pgsql for a table
which I know exists.

Hm, what PG version is this? It might be that reindexing pg_class will
fix it, but it would be nice to try to determine what's wrong before
overwriting the evidence.

Thanks for the response, version is
psql (PostgreSQL) 8.0.3

8.0.3 is more than two years old --- you really ought to update to the
latest in that branch (8.0.13 currently), if not upgrade to 8.1.x or
8.2.x branches. I do see a post-8.0.3 fix that might explain loss of
index entries, so trying a reindex is worth doing at this point.

regards, tom lane

#7Sinead O Brien
reapersoul@hotmail.com
In reply to: Tom Lane (#6)
Re: did not find any relation for existing table

8.0.3 is more than two years old --- you really ought to update to the
latest in that branch (8.0.13 currently), if not upgrade to 8.1.x or
8.2.x branches. I do see a post-8.0.3 fix that might explain loss of
index entries, so trying a reindex is worth doing at this point.

Thank you very much. We'll try that out.

_________________________________________________________________
Message offline contacts without any fire risk!
http://www.communicationevolved.com/en-ie/

#8Prashant Ranjalkar
prashant.ranjalkar@gmail.com
In reply to: Sinead O Brien (#5)
Re: did not find any relation for existing table

Hello,

Please check the output of the below query.

select tablename,schemaname from pg_tables where schemaname='history';

I assume that the table might have created under public schema. Please check
the output of the above query and if the output consists of public in place
of schemaname column then the object is residing in public schema not in
history schema.

Please try this.

Regards,
Prashant Ranjalkar
EnterpriseDB

Show quoted text

On 5/7/07, Sinead O Brien <reapersoul@hotmail.com> wrote:

"Sinead O Brien" <reapersoul@hotmail.com> writes:

I am receiving a "did not find any relation" error in pgsql for a

table

which I know exists.

Hm, what PG version is this? It might be that reindexing pg_class will
fix it, but it would be nice to try to determine what's wrong before
overwriting the evidence.

Thanks for the response, version is
psql (PostgreSQL) 8.0.3

_________________________________________________________________
Message offline contacts without any fire risk!
http://www.communicationevolved.com/en-ie/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#9Sinead O Brien
reapersoul@hotmail.com
In reply to: Prashant Ranjalkar (#8)
Re: did not find any relation for existing table

Please check the output of the below query.

select tablename,schemaname from pg_tables where schemaname='history';

I assume that the table might have created under public schema. Please
check
the output of the above query and if the output consists of public in place
of schemaname column then the object is residing in public schema not in
history schema.

cdx_post-# select tablename,schemaname from pg_tables where
schemaname='history';
tablename | schemaname
------------------------------+------------
client | history

Thanks for the suggestion though (-:

_________________________________________________________________
Share folders without harming wildlife!
http://www.communicationevolved.com/en-ie/