Re: Relation "tablename" does not exist - Mailing list pgsql-general

From Richard Huxton
Subject Re: Relation "tablename" does not exist
Date
Msg-id 449106E6.3060505@archonet.com
Whole thread Raw
In response to Relation "tablename" does not exist  ("Johan van der Merwe" <johan@bnrel.co.za>)
List pgsql-general
Johan van der Merwe wrote:
> I have posted this before without receiving replies

Can't see it in the archives. Were you subscribed?

> My code is as follows:
>
> Public dbRemote As New Connection
> Public rsData As New Recordset
>
> dbRemote.Properties("Data Source").Value = "DSM"
> dbRemote.Properties("Initial Catalog").Value = "BCM_DSM"
> dbRemote.Properties("User ID").Value = "johan"
> dbRemote.Properties("Password").Value = "johan"
> dbRemote.Open
>
> rsData.Open "tblSuburb", dbRemote, , , adCmdTable
>
>
> I receive the error "Relation "tblSuburb" does not exist"

Either you created the table quoted (thus preserving its case) and you
are accessing it unquoted (so it's folded to lower-case) or the other
way around. It's how PostgreSQL provides case-insensitive table-names.

So:
CREATE "TaBlE1" ...
SELECT * FROM "TaBlE1" (works)
SELECT * FROM table1 (fails)
CREATE TaBlE2 ...
SELECT * FROM "TaBlE2" (works)
SELECT * FROM table2 (works)
SELECT * FROM TABLE2 (works)

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Johan van der Merwe"
Date:
Subject: Relation "tablename" does not exist
Next
From: Richard Huxton
Date:
Subject: Re: how pg_hba.conf