Re: Column Name = column does not exist - Mailing list pgsql-novice

From Sean Davis
Subject Re: Column Name = column does not exist
Date
Msg-id 45A2C9E1.6010804@mail.nih.gov
Whole thread Raw
In response to Column Name = column does not exist  (brian stapel <brians_224@hotmail.com>)
List pgsql-novice
brian stapel wrote:
> Thanks for your time.
>
> I'm in the process of trying to incorporate three Human Resource
> systems into one.  Each of the three systems had a different author
> and no standards were followed - consequently the table design leaves
> a bit to be desired.  One of the most critical tables has a field
> named:Last_Name (case specific).  When I execute 'Select Last_Name
> from employee' the statement fails with the following message: column
> "last_name" does not exist.  If I wrap the field name in quotes
> "Last_Name" for example, the query works as expected.
>
> Is this typical behavior?
>
Yes.  Postgresql case-collapses unless things are quoted.  The rule of
thumb is, if you quote anywhere, you probably should quote EVERYWHERE.

Sean

pgsql-novice by date:

Previous
From: brian stapel
Date:
Subject: Column Name = column does not exist
Next
From: "Carlson, James (Jim)"
Date:
Subject: Keeping a Backup database in sync with the primary