Re: White space affecting parsing of range values

2020-05-06 Thread Thom Brown
On Wed, 6 May 2020 at 17:33, Tom Lane wrote: > > Thom Brown 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 us

Re: White space affecting parsing of range values

2020-05-06 Thread Thom Brown
On Wed, 6 May 2020 at 17:30, Adrian Klaver wrote: > > On 5/6/20 9:19 AM, Thom Brown wrote: > > On Wed, 6 May 2020 at 17:13, Adrian Klaver > > wrote: > >> > >> On 5/6/20 9:00 AM, Thom Brown wrote: > >>> Hi, > >>> > >>> I noticed I'm getting an error when adding white space to a numeric > >>> rang

Re: White space affecting parsing of range values

2020-05-06 Thread Tom Lane
Thom Brown 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 staye

Re: White space affecting parsing of range values

2020-05-06 Thread Adrian Klaver
On 5/6/20 9:19 AM, Thom Brown wrote: On Wed, 6 May 2020 at 17:13, Adrian Klaver wrote: On 5/6/20 9:00 AM, Thom Brown wrote: Hi, I noticed I'm getting an error when adding white space to a numeric range. I can run this: postgres=# SELECT 5::numeric <@ '(,10]'::numrange; ?column?

Re: White space affecting parsing of range values

2020-05-06 Thread Thom Brown
On Wed, 6 May 2020 at 17:13, Adrian Klaver wrote: > > On 5/6/20 9:00 AM, Thom Brown wrote: > > Hi, > > > > I noticed I'm getting an error when adding white space to a numeric > > range. I can run this: > > > > postgres=# SELECT 5::numeric <@ '(,10]'::numrange; > > ?column? > > -- > >

Re: White space affecting parsing of range values

2020-05-06 Thread Adrian Klaver
On 5/6/20 9:00 AM, Thom Brown wrote: Hi, I noticed I'm getting an error when adding white space to a numeric range. I can run this: postgres=# SELECT 5::numeric <@ '(,10]'::numrange; ?column? -- t (1 row) But I can't run this: postgres=# SELECT 5::numeric <@ '( ,10]'::numrange;

White space affecting parsing of range values

2020-05-06 Thread Thom Brown
Hi, I noticed I'm getting an error when adding white space to a numeric range. I can run this: postgres=# SELECT 5::numeric <@ '(,10]'::numrange; ?column? -- t (1 row) But I can't run this: postgres=# SELECT 5::numeric <@ '( ,10]'::numrange; ERROR: invalid input syntax for type num