pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Stanaway <david@stanaway.net>
To: Scot Wilcoxon <scot@wilcoxon.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Uppercase field names not found
Date: 18 Jun 2002 07:47:37 -0500
Message-ID: <1024404457.9198.17.camel@ciderbox> (raw)
In-Reply-To: <3D0E8C13.4000205@wilcoxon.org>
References: <3D0E8C13.4000205@wilcoxon.org>

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

Attachments:

  signature.asc (application/pgp-signature, 480B) download

view thread (5+ messages)  latest in thread

Message-ID: <1024404457.9198.17.camel@ciderbox>
Permalink:  ../1024404457.9198.17.camel@ciderbox/
Also on:    postgresql.org/message-id/1024404457.9198.17.camel@ciderbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: david@stanaway.net, scot@wilcoxon.org
  Subject: Re: Uppercase field names not found
  In-Reply-To: <1024404457.9198.17.camel@ciderbox>
  References: <3D0E8C13.4000205@wilcoxon.org> <1024404457.9198.17.camel@ciderbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox