Re: SELECT of pseudo hex value gives unexpected result

From: "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SELECT of pseudo hex value gives unexpected result
Date: 2019-01-29 16:55:29
Message-ID: ccfeb228-01ab-9354-f60e-5a2dc47bd565@pro-open.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 29.01.2019 um 17:39 schrieb Tom Lane:
> "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de> writes:
>> Tried
>> SELECT 0x5e73266725;

[...]

> SELECT 0 AS x5e73266725;
>
> and that's the result you got.

Well, yeah, _that_ was pretty obvious. I just didn't expect ot to happen...

> 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.

it kind of comforts me that it's at least not defined like that in the
standard ;-)

Cheers anyway!
--
Gunnar "Nick" Bluth
RHCE/SCLA

Mobil +49 172 8853339
Email: gunnar(dot)bluth(at)pro-open(dot)de
__________________________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX. Ten years later
they are choosing Windows over UNIX. What part of that message aren't you
getting? - Tom Payne

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jiří Fejfar 2019-01-29 17:35:47 parallel plpgsql function
Previous Message Laurenz Albe 2019-01-29 16:41:21 Re: SELECT of pseudo hex value gives unexpected result