Re: first message: SELECT FROM

From Scott Marlowe
Subject Re: first message: SELECT FROM
Date
Msg-id dcc563d10802020959xbad7d2ev5be1bcfa23851205@mail.gmail.com
Whole thread Raw
In response to first message: SELECT FROM  ("Aílsom F. Heringer" <ailsom@gmail.com>)
List pgsql-general
On Feb 2, 2008 11:43 AM, Aílsom F. Heringer <ailsom@gmail.com> wrote:
> Hi,
> This is my first message, and I need some help. I have just installed
> Postgresql 8.2. (Windows).
>
> At pgAdmin III Query, when I send SELECT * FROM USUARIOS, I get all
> columns correctly. But when I try to get only one column, SELECT senha
> FROM USUARIOS, I get the error message:
>
> ERROR: column "senha" does not exist
> SQL state: 42703
> Character: 8
>
> What is the problem ?

Most likely this is a mixed case issue.

If you create a table like so:

create table abc (Field1 int);

it will create table abc with a field called field1.  Notice the
automatic case folding.  If you quote it, like so

create table abc ("Field1" int);

It will create Field1 instead.  From then on, you'll have to quote
that field to get it by name, because asking for Field1 without
quotes, or field1 with or without quotes, will get folded to lower
case, and won't match Field1

pgsql-general by date:

Previous
From: "Aílsom F. Heringer"
Date:
Subject: Re: first message: SELECT FROM
Next
From: "Aílsom F. Heringer"
Date:
Subject: Re: first message: SELECT FROM