Thread: table does not exist

table does not exist

From
Tim Stevens
Date:
Hello,

I have installed postgresql version 6.4.2 on a Red Hat Linux 6.0 box.  I
have it up and running.

I have used pgaccess to create some tables, and enter some data into
them, but when i run a query I get the following message:  <tablename>:
Table does not exist.

my table name is COMPANIES

I am using the following query:  SELECT ID, NAME FROM COMPANIES

I run a \dt from the psql interface and my tables show up, but I can not
query them.  Is there an administrative step I must do first?

Thanks

Tim Stevens

Tim Stevens
Genesis Networks, Inc.
3943 South 48th Street, Lincoln, NE 68506
Phone 402-488-6468
fax 402-488-6535
E-mail tstevens@genesisnets.com


Re: [GENERAL] table does not exist

From
"Ross J. Reedstrom"
Date:
On Thu, Aug 05, 1999 at 05:34:17PM -0500, Tim Stevens wrote:
> Hello,
>
> I have installed postgresql version 6.4.2 on a Red Hat Linux 6.0 box.  I
> have it up and running.
>
> I have used pgaccess to create some tables, and enter some data into
> them, but when i run a query I get the following message:  <tablename>:
> Table does not exist.
>
> my table name is COMPANIES
>
> I am using the following query:  SELECT ID, NAME FROM COMPANIES

Tim -
you've had Oracle experience, haven't you? PostgreSQL is also case insensitive,
as per the SQL standard, but defaults to lowercase, rather than uppercase.

try (from a pgsql prompt, preferably):
SELECT id, name FROM companies;

or

SELECT "ID", "NAME" from "COMPANIES";

Ah, I just realized. What version of pgaccess are you running? Constantin
Teodorescu and I fixed up some quoting problems (I've got a bunch of
MixedCase table and field names.) in 0.96. I think a release of 0.97 is due
this week. You could try recreating your tables with lowercase names.

Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005