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