From: | Digital Wokan <wokan(at)cox(dot)net> |
---|---|
To: | PGSQL Administration <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Uppercase field names not found |
Date: | 2002-06-18 21:58:50 |
Message-ID: | 3D0FAD1A.2050501@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Warner | 2002-06-18 22:08:30 | pg_dump and restore from 7.0? to 7.2.1 problem |
Previous Message | David Stanaway | 2002-06-18 21:47:57 | Re: Uppercase field names not found |