Re: Ought binary literals to allow spaces?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ought binary literals to allow spaces?
Date: 2020-02-23 22:00:50
Message-ID: 6695.1582495250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chapman Flack <chap(at)anastigmatix(dot)net> writes:
> ISO seems to allow spaces among the digits of a binary literal, so as
> to group them for readability, as in X'00ba b10c'. We seem not to.

Hmm. SQL99 did not allow noise spaces in <binary string literal> and
related productions, but it does look like they added that in SQL:2008.

> (The B'...' form appears to be a PostgreSQL extension, but I imagine
> if ISO had it, it would allow spaces too.)

The B'...' form was there in SQL99. The committee took it out in
SQL:2003 or so, along with the BIT type, but we still have both.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-02-23 22:01:43 v12 "won't fix" item regarding memory leak in "ATTACH PARTITION without AEL"; (or, relcache ref counting)
Previous Message Tom Lane 2020-02-23 21:49:12 Re: pgsql: Add kqueue(2) support to the WaitEventSet API.