Re: first message: SELECT <column> FROM <t

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Aílsom F(dot) Heringer <ailsom(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: first message: SELECT <column> FROM <t
Date: 2008-02-02 17:59:36
Message-ID: dcc563d10802020959xbad7d2ev5be1bcfa23851205@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Feb 2, 2008 11:43 AM, Aílsom F. Heringer <ailsom(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Aílsom F. Heringer 2008-02-02 18:05:40 Re: first message: SELECT <column> FROM <t
Previous Message Aílsom F. Heringer 2008-02-02 17:59:06 Re: first message: SELECT <column> FROM <t