From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, PGSQL Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: White space affecting parsing of range values |
Date: | 2020-05-06 16:53:46 |
Message-ID: | CAA-aLv5OBoSZZEzUko-ydqUJDe2DY4FWiVuiEUWeQ_52iTWNcw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 6 May 2020 at 17:33, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Thom Brown <thom(at)linux(dot)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.
Okay, I see that this isn't really worth changing. It's surprising
behaviour, but I can see it's not a huge issue, and can be worked
around anyway.
Thanks
--
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Support | 2020-05-06 22:37:49 | previous replication slot and new initdb |
Previous Message | Thom Brown | 2020-05-06 16:51:29 | Re: White space affecting parsing of range values |