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

From Josh Kupershmidt
Subject Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Date
Msg-id AANLkTinEqV5U7wqnQRcGMdNQ-LkFNYWq6BJrHQGzo1qY@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Oct 28, 2010 at 8:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "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. =A0Any situation where you have
> some digits followed by something that can't be part of a number will
> be lexed as two separate tokens.

Yeah, I hadn't tried to pinpoint how widespread this feature/bug is in
the syntax. Though note, you can see this with e.g. text columns as
well, such as in:
SELECT * FROM mytab WHERE mycol =3D 'abc def'AND true;

Josh

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."
Next
From: Josh Kupershmidt
Date:
Subject: Re: BUG #5732: parsing of: "WHERE mycol=123AND ..."