From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Lee Hachadoorian <Lee(dot)Hachadoorian+L(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SQL keywords are suddenly case sensitive |
Date: | 2013-04-17 01:22:09 |
Message-ID: | CAOR=d=2Nd5=HW4+ThDq3_jWkzod744m-SxKiJgf+Rc6QHv4cDA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I've seen this in the ticketing system Front Range where it sticks in
nbsp into the text windows and if you copy and paste it won't work.
Frustrating as all hell.
On Tue, Apr 16, 2013 at 7:18 PM, Lee Hachadoorian
<Lee(dot)Hachadoorian+L(at)gmail(dot)com> wrote:
>
> On 04/16/2013 08:23 PM, Tom Lane wrote:
>>
>> Lee Hachadoorian <Lee(dot)Hachadoorian+L(at)gmail(dot)com> writes:
>>>
>>> SQL seems to be behaving in a case-sensitive manner:
>>> universe=# select 1;
>>> ?column?
>>> ----------
>>> 1
>>> (1 row)
>>> universe=# SELECT 1;
>>> ERROR: syntax error at or near "SELECT 1"
>>> LINE 1: SELECT 1;
>>> ^
>>
>> That's really bizarre, but I don't think it's a case sensitivity problem
>> as such. Watch what I get from a syntax error on a normally-functioning
>> system:
>>
>> $ psql
>> psql (9.1.9)
>> Type "help" for help.
>>
>> regression=# select 1;
>> ?column?
>> ----------
>> 1
>> (1 row)
>>
>> regression=# SELECT 1;
>> ?column?
>> ----------
>> 1
>> (1 row)
>>
>> regression=# xELECT 1;
>> ERROR: syntax error at or near "xELECT"
>> LINE 1: xELECT 1;
>> ^
>>
>> See the differences? The error message indicates that your parser saw
>> "SELECT 1" as all one token. Also, if you transcribed this accurately,
>> it looks like the error cursor is pointing to the second character of
>> the "SELECT" not the first (could you confirm that?). Which is even
>> more bizarre. I'm not sure what's going on, but I think it's more
>> likely to be something to do with whitespace not being really whitespace
>> than it is with case as such. Consider the possibility that you're
>> somehow typing a non-breaking space or some such character. One thing
>> that might be useful is to examine the error report in the postmaster
>> log using an editor that will show you any non-printing characters.
>>
>> regards, tom lane
>
>
> Tom,
>
> Yes, nonbreaking spaces was the problem. Sorry for the red herring re: case
> sensitivity, and thanks for figuring it out. Adrian, thanks for your input
> as well.
>
> Best,
>
> --Lee
>
> --
> Lee Hachadoorian
> Assistant Professor in Geography, Dartmouth College
> http://freecity.commons.gc.cuny.edu
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
--
To understand recursion, one must first understand recursion.
From | Date | Subject | |
---|---|---|---|
Next Message | ascot.moss@gmail.com | 2013-04-17 02:04:07 | How to build my own 9.2.4 installer package for IBM Power System ppc64 |
Previous Message | Lee Hachadoorian | 2013-04-17 01:18:59 | Re: SQL keywords are suddenly case sensitive |