On Thu, Oct 28, 2010 at 5:20 PM, Tom Lane <t...@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:

<identifier body>    ::=  <identifier start> [ <identifier part>... ]
<identifier part>      ::=   <identifier start>  | <identifier extend>
<identifier start>     ::= !! See the Syntax Rules
<identifier extend> ::= !! See the Syntax Rules

1) An <identifier start> is any character in the Unicode General
Category classes “Lu”, “Ll”, “Lt”, “Lm”, “Lo”, or “Nl”.
NOTE 70 — The Unicode General Category classes “Lu”, “Ll”, “Lt”, “Lm”,
“Lo”, and “Nl” are assigned to Unicode characters that are,
respectively, upper-case letters, lower-case letters, title-case
letters, modifier letters, other letters, and letter numbers.

2) An <identifier extend> is U+00B7, “Middle Dot”, or any character in
the Unicode General Category classes “Mn”, “Mc”, “Nd”, “Pc”, or “Cf”.
NOTE 71 — The Unicode General Category classes “Mn”, “Mc”, “Nd”, “Pc”,
and “Cf” are assigned to Unicode characters that are, respectively,
nonspacing marks, spacing combining marks, decimal numbers, connector
punctuations, and formatting codes.


-- 
greg

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to