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

Re: Not able to find a table

From: Brian Hurt <bhurt(at)janestcapital(dot)com>
To: Dale Seaburg <kg5lt(at)verizon(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Not able to find a table
Date: 2007-07-30 14:41:13
Message-ID: 46ADF889.3000302@janestcapital.com (view raw or flat)
Thread:
Lists: pgsql-novice
Dale Seaburg wrote:

> I have a database that can be accessed and used correctly via ODBC  
> and MS-Access.  But when I try to do a simple SQL SELECT query in  
> psql, I get an error that the table can't be found: Relation  
> "instrument_type" does not exist.  Yet, when I do a "\d" command, I  
> see the table named "Instrument_Type" in the "public" schema.  I use  
> the database owner as the user id for psql.
>
> I need some help where to look in, say pgAdmin III (my tool of choice  
> for database creation / maintenance) for a clue as to why I am  
> getting this error.
>
> Thanks for any help, ideas, clues, starting points.
>

Try doing:

select * from "Instrument_Type" limit 10;


in psql.  The problem is that for unquoted table names, postgres 
automatically lower-cases everything.  To access tables with upper case 
letters in their names, you need to quote them (using " quotes).

Brian


In response to

pgsql-novice by date

Next:From: Michael FuhrDate: 2007-07-30 14:43:51
Subject: Re: Not able to find a table
Previous:From: Dale SeaburgDate: 2007-07-30 14:26:58
Subject: Not able to find a table

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