Re: relation does not exist error

From: "Ian Harding" <iharding(at)tpchd(dot)org>
To: <simonwittber(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: relation does not exist error
Date: 2004-12-03 14:34:06
Message-ID: s1b00957.052@MAIL.TPCHD.ORG
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The answer is in the question! It's the difference between Customers
and customers.

PostgreSQL folds identifiers to lower case if not double quoted.

The best solution is to use lower case consistently. The alternative is
to use double quotes consistently.

Try SELECT * FROM "Customers"; and you will be happy again.

Ian Harding
Programmer/Analyst II
Tacoma-Pierce County Health Department
iharding(at)tpchd(dot)org
Phone: (253) 798-3549
Pager: (253) 754-0002

>>> Simon Wittber <simonwittber(at)gmail(dot)com> 12/02/04 7:01 PM >>>
I'm evaluationg PostgreSQL 8.0 beta 5 for a new development project.

I've created a user 'simon' and a database named 'WMSDV'.

I've created some tables (see below) and assigned arwdRxt privledges
to the 'simon' user.

However, when i use psql, I am unable to select these tables. I
receive a 'relation "'tabename' does not exist" error. I'm completely
new to PostgreSQL, and this problem has me stumped.

Can anyone point me in the right direction?

Sw.

WMSDV=# \dt
List of relations
Schema | Name | Type | Owner
--------+-----------+-------+-------
public | Customers | table | simon
public | Persons | table | simon
(2 rows)

WMSDV=# select * from Customers;
ERROR: relation "customers" does not exist
WMSDV=# select * from public.Customers;
ERROR: relation "public.customers" does not exist
WMSDV=#

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2004-12-03 14:40:20 Re: reclaiming diskspace bloat w/near-zero downtime
Previous Message Magnus Hagander 2004-12-03 13:26:14 Re: general questions on Postgresql and deployment on win32 platform