Thread: Not existing relations ...

Not existing relations ...

From
"linux"
Date:
I have question about tabels' names convertion ...
3 tabels below were exported by ODBC to the DataBase, ...
Access join to them witout any problem, but from my program
(write in C++Builder) by ODBC I get message like this:
"Key violation.
Error while executing the query:
ERROR: Relation 'firsttable' does not exist.",
and the same is when I write question in psql.

DataBase=# \dt
          List of relations
       Name        | Type  |  Owner
-------------------+-------+----------
 FirstTable        | table | postgres
 SecondTable       | table | postgres
 ThirdTable        | table | postgres
(3 rows)

DataBase=# select * from FirstTable;
ERROR:  Relation 'firsttable' does not exist

Do I have to write question in lower case ?
Is there any other way to do something with this problem ?

I have Postgres version 7.0.3-8.

Sorry for my English ...

--
RysiekLL - Ryszard Wi�cek
rysiekll@vicom.ig.pl
+48 604 559724





Re: Not existing relations ...

From
Antonio Fiol Bonnín
Date:
> DataBase=# \dt
>           List of relations
>        Name        | Type  |  Owner
> -------------------+-------+----------
>  FirstTable        | table | postgres
>  SecondTable       | table | postgres
>  ThirdTable        | table | postgres
> (3 rows)
>
> DataBase=# select * from FirstTable;
> ERROR:  Relation 'firsttable' does not exist

select * from "FirstTable";

will probably work.

You may also (if you do not need to access them from MSAccess any more)

ALTER TABLE "FirstTable" RENAME TO firsttable;

If you do not enclose the table names in double quotes ("), they are
converted to lower case, AFAIK.

Good luck!

Antonio