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 28626.1288310466@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5732: parsing of: "WHERE mycol=123AND ..."  ("Josh Kupershmidt" <schmiddy@gmail.com>)
Responses Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
List pgsql-bugs
"Josh Kupershmidt" <schmiddy@gmail.com> writes:
> I noticed that Postgres in many cases will happily tokenize WHERE clauses
> having no space between a condition and "AND" or "OR".

This has nothing to do with AND or OR.  Any situation where you have
some digits followed by something that can't be part of a number will
be lexed as two separate tokens.  I'm not sure we could change that,
because it's a pretty basic aspect of a flex lexer; and even if we
could I'm not eager to face the wrath of all the users whose queries
would break.  Leaving out "unnecessary" spaces is a pretty common habit.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Mark Kirkwood
Date:
Subject: Re: Btree index left link changed unexpectedly after bringing up 8.3.11 warm standby
Next
From: Jeff Davis
Date:
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."