Re: ERROR: column 'xxx' does not exist (under v. 7.4.1) - Mailing list pgsql-general

From Mark Gibson
Subject Re: ERROR: column 'xxx' does not exist (under v. 7.4.1)
Date
Msg-id 40225E77.8050301@cromwell.co.uk
Whole thread Raw
In response to ERROR: column 'xxx' does not exist (under v. 7.4.1)  (Iker Arizmendi <iker@research.att.com>)
Responses Re: ERROR: column 'xxx' does not exist (under v. 7.4.1)  (Mark Gibson <gibsonm@cromwell.co.uk>)
List pgsql-general
Iker Arizmendi wrote:

>
> Using psql and running as the owner of the table "app" I
> try to access the columns of the table like so:
>
>    SELECT * FROM app;
>
> which returns all the columns in the table including
> the one I'm interested in, which is "companyID".
> If instead I use something like:
>
>    SELECT companyID FROM app;
>
> I get the following:
>
>    ERROR: column "companyid" does not exist
>
> even though the column DOES exist (the previous query
> returned "companyID" as one of the column headers). Any
> suggestions as to what I might be missing? I'm running
> Postgres 7.4.1.
>
> Regards,
> Iker


You need to quote the table name if it contains upper case or strange
characters:

SELECT "companyID" FROM app;

--
Mark Gibson <gibsonm@cromwell.co.uk>
Web Developer & Database Admin
Cromwell Tools Ltd.
Leicester, England.



pgsql-general by date:

Previous
From: Iker Arizmendi
Date:
Subject: ERROR: column 'xxx' does not exist (under v. 7.4.1)
Next
From: Carlos Ojea Castro
Date:
Subject: : Proper tool to display graphics?