Thread: reject empty string in float[48], oid

reject empty string in float[48], oid

From
Neil Conway
Date:
This patch changes the input routines for float4, float8 and oid to
reject empty strings (rather than treating them as "0"). In 8.0 we issue
a warning about this behavior and indicate that the input will not be
accepted by a future release, so it seems reasonable to disallow the
input in 8.1. The patch also updates the regression tests.

Barring any objections, I'll apply this to HEAD tomorrow.

-Neil


Attachment

Re: reject empty string in float[48], oid

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> This patch changes the input routines for float4, float8 and oid to
> reject empty strings (rather than treating them as "0"). In 8.0 we issue
> a warning about this behavior and indicate that the input will not be
> accepted by a future release, so it seems reasonable to disallow the
> input in 8.1. The patch also updates the regression tests.

If you're going to add regression tests, how about testing the case of a
non-empty-but-all-whitespace string?

            regards, tom lane

Re: reject empty string in float[48], oid

From
Neil Conway
Date:
On Thu, 2005-02-10 at 20:53 -0500, Tom Lane wrote:
> If you're going to add regression tests, how about testing the case of a
> non-empty-but-all-whitespace string?

AFAICS that is already tested for.

-Neil



Re: reject empty string in float[48], oid

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> On Thu, 2005-02-10 at 20:53 -0500, Tom Lane wrote:
>> If you're going to add regression tests, how about testing the case of a
>> non-empty-but-all-whitespace string?

> AFAICS that is already tested for.

[ looks again... ]  Doh.  Maybe you should put these tests next to those
then...

            regards, tom lane

Re: reject empty string in float[48], oid

From
Neil Conway
Date:
On Thu, 2005-02-10 at 21:04 -0500, Tom Lane wrote:
> Maybe you should put these tests next to those then...

Ok, fair enough. Patch applied to HEAD.

-Neil