pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thom Brown <thom@linux.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: PGSQL Mailing List <pgsql-general@postgresql.org>
Subject: Re: White space affecting parsing of range values
Date: Wed, 06 May 2020 12:33:33 -0400
Message-ID: <15749.1588782813@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA-aLv468f4g=2EhsnVZs32o8tE32GmD-V71BMY+7ct=cMAnwg@mail.gmail.com>
References: <CAA-aLv7oUgi6RGJetZwuvoVz=wdcZBmWkY3wMOyW2fGVpN+ybQ@mail.gmail.com>
	<597b7d3a-170c-5c17-00db-1702c69ac59a@aklaver.com>
	<CAA-aLv468f4g=2EhsnVZs32o8tE32GmD-V71BMY+7ct=cMAnwg@mail.gmail.com>

Thom Brown <thom@linux.com> writes:
> I guess I should read the docs more carefully.  Shouldn't this be
> insignificant for a numeric value?

That would require the range code to know whether the subtype considers
whitespace significant (or perhaps more usefully, whether an all-spaces
input is valid).  We've stayed away from requiring range_in to have any
type-specific knowledge of that sort.

Still, you could argue that the rule ought to be "an empty or all-blank
value must be quoted to distinguish it from an omitted bound" rather than
"an empty value must be quoted to distinguish it from an omitted bound".

I'm not sure if we could get away with redefining that at this point,
though.  It looks like range_out quotes such values already, so maybe a
change wouldn't be totally catastrophic (in the sense of breaking dump
files).  But I still suspect there would be more people unhappy than
happy.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <15749.1588782813@sss.pgh.pa.us>
Permalink:  ../15749.1588782813@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15749.1588782813@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thom@linux.com, adrian.klaver@aklaver.com
  Subject: Re: White space affecting parsing of range values
  In-Reply-To: <15749.1588782813@sss.pgh.pa.us>
  References: <CAA-aLv7oUgi6RGJetZwuvoVz=wdcZBmWkY3wMOyW2fGVpN+ybQ@mail.gmail.com> <597b7d3a-170c-5c17-00db-1702c69ac59a@aklaver.com> <CAA-aLv468f4g=2EhsnVZs32o8tE32GmD-V71BMY+7ct=cMAnwg@mail.gmail.com> <15749.1588782813@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox