Unix Technical Forum

BUG #1817: column not exist

This is a discussion on BUG #1817: column not exist within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1817 Logged by: nguyen Email address: ngthanhthuat@yahoo.com PostgreSQL version: 8.0.3 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:05 AM
nguyen
 
Posts: n/a
Default BUG #1817: column not exist


The following bug has been logged online:

Bug reference: 1817
Logged by: nguyen
Email address: ngthanhthuat@yahoo.com
PostgreSQL version: 8.0.3
Operating system: windown2000 server
Description: column not exist
Details:

when i excecuted sql command "select * from employee" then result were ok,
but if sql command were "select employeeID from employee" then have error
return : column employeeID does not exist

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:05 AM
Richard Huxton
 
Posts: n/a
Default Re: BUG #1817: column not exist

nguyen wrote:
>
> when i excecuted sql command "select * from employee" then result were ok,
> but if sql command were "select employeeID from employee" then have error
> return : column employeeID does not exist


This error is usually produced because a column of that name does not exist.

Since you are using a mixed-case column-name, I'm guessing that's the
cause of the problem. If you create a column mixed-case by quoting it:

CREATE TABLE employee (
"employeeID" int4
...
)

Then you need to quote it when you use it:

SELECT "employeeID" FROM employee;

If you don't quote when you create, then the column is case-insensitive.

See the mailing-list archives for plenty of details.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com