Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 78F6F476AC8 for ; Tue, 18 Jun 2002 15:52:54 -0400 (EDT) Received: from mail-00.rni.net (mail-00.rni.net [64.158.128.147]) by postgresql.org (Postfix) with ESMTP id 5977F476861 for ; Tue, 18 Jun 2002 14:58:54 -0400 (EDT) Received: from cox.net (unknown.rni.net [64.158.131.9] (may be forged)) by mail-00.rni.net (8.11.2/8.11.2) with ESMTP id g5IJEN503361 for ; Tue, 18 Jun 2002 12:14:24 -0700 Message-ID: <3D0FAD1A.2050501@cox.net> Date: Tue, 18 Jun 2002 14:58:50 -0700 From: Digital Wokan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: PGSQL Administration Subject: Re: Uppercase field names not found References: <3D0E8C13.4000205@wilcoxon.org> <1024404457.9198.17.camel@ciderbox> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/123 X-Sequence-Number: 4558 So I suppose since he's referring to a field, to pull it in all uppercase, he'd use... SELECT "ABC" from mytable; Am I correct? David Stanaway wrote: > On Mon, 2002-06-17 at 20:25, Scot Wilcoxon wrote: > >>I've seen a few comments of people encountering this problem, but not >>yet a solution: >> >>Upper case field names in commands are forced to lower case and then not >>found. >> >>I was able to create a table with a field called "ABC". >> >>"SELECT ABC FROM mytable;" >>emits the error >>"no such attribute or function abc" >> > > > If it is possible, you will have a much easier time if you change you > schema to use case folded names > > EG: > CREATE TABLE Foo ( ... ) > rather than: CREATE TABLE "Foo" ( ... ) > > otherwise.. You will need to change your code to quote all references to > the name: > > EG: > $q = 'SELECT * from "Foo"'; > > If you don't put ["]'s around the object identifier, it gets case folded > to lower case. > > -- > David Stanaway >