Re: [SQL] Token separation

2012-01-20 Thread Jasen Betts
On 2012-01-16, Tim Landscheidt wrote: > Tom Lane wrote: > >>> [ "0x13" is lexed as "0" then "x13" ] > >>> Is this behaviour really conforming to the standard? > >> Well, it's pretty much the universal behavior of flex-based lexers, >> anyway. A token ends when the next character can no longer se

Re: [SQL] Token separation

2012-01-16 Thread Tim Landscheidt
Tom Lane wrote: >> [ "0x13" is lexed as "0" then "x13" ] >> Is this behaviour really conforming to the standard? > Well, it's pretty much the universal behavior of flex-based lexers, > anyway. A token ends when the next character can no longer sensibly > be added to it. I know, but - off the

Re: [SQL] Token separation

2012-01-15 Thread Tom Lane
Tim Landscheidt writes: > [ "0x13" is lexed as "0" then "x13" ] > Is this behaviour really conforming to the standard? Well, it's pretty much the universal behavior of flex-based lexers, anyway. A token ends when the next character can no longer sensibly be added to it. Possibly the documentat

[SQL] Token separation

2012-01-15 Thread Tim Landscheidt
Hi, I just tried to input a hexadecimal number in PostgreSQL (8.4) and was rather surprised by the result: | tim=# SELECT 0x13; | x13 | - |0 | (1 Zeile) | tim=# SELECT 0abc; | abc | - |0 | (1 Zeile) | tim=# The documentation says: | A token can be a key word, an identifier,