Re: BUG #5732: parsing of: "WHERE mycol=123AND ..." - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Date
Msg-id 19944.1288463031@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."  (Greg Stark <gsstark@mit.edu>)
Responses Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."  (Gary Doades <gpd@gpdnet.co.uk>)
Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."  (Greg Stark <gsstark@mit.edu>)
List pgsql-bugs
Greg Stark <gsstark@mit.edu> writes:
> On Thu, Oct 28, 2010 at 5:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I experimented a bit with mysql's behavior, and it seems that (at least
>> in 5.1.51) what they do is treat "1and" or "2or" as if it were an
>> identifier.  They're definitely not throwing an error, at least not on

> I guess the eleant question is what the lexical elements section of
> the standard says about identifiers. It pretty clearly declares that
> they can't start with digits:

Yeah.  The key point IMO is that this *input* is not spec-compliant.
So implementations can either throw an error, or define their own
spec extension as to how to interpret it.  I find mysql's behavior
interesting mostly because it shows that throwing an error isn't
necessarily common practice.  Anybody want to try Oracle, DB2, etc?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Greg Stark
Date:
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Next
From: Gary Doades
Date:
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."