"Gunnar \"Nick\" Bluth" <gunnar.bluth@xxxxxxxxxxx> writes: > Tried > SELECT 0x5e73266725; > and received: > -[ RECORD 1 ]-- > x5e73266725 | 0 > That was not what I expected... is this expected/documented behaviour? Well, there are no hex literals in (PG's notion of) SQL, so that isn't a valid token. But it's the concatenation of two valid tokens. So what you wrote is the same as SELECT 0 x5e73266725; which is an abbreviation for SELECT 0 AS x5e73266725; and that's the result you got. I think that the SQL standard considers adjacent tokens to be invalid unless one of them is punctuation (e.g. 1+2), but our lexer is a bit less rigid about that. regards, tom lane