Re: tighten input to float4/float8/oid - Mailing list pgsql-patches

From Neil Conway
Subject Re: tighten input to float4/float8/oid
Date
Msg-id 4046B423.8000700@samurai.com
Whole thread Raw
In response to Re: tighten input to float4/float8/oid  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: tighten input to float4/float8/oid
List pgsql-patches
Tom Lane wrote:
> I think this is wrong.  We silently accept leading whitespace in
> (IIRC) all the numeric datatypes, and I believe we should accept
> trailing whitespace too.

(Sorry, I had misremembered your suggestion -- you had earlier said
that the spec probably allows for leading and trailing whitespace.)

I think there's a case to be made that we shouldn't accept either
leading or trailing whitespace, but it seems too late to go down that
path: it isn't worth breaking backward compatibility over, for one thing.

So if we're going to continue to accept leading whitespace, it seems
only reasonable to consistently accept trailing whitespace as well.

> Minor stylistic gripe here: errdetail and errhint messages are
> supposed to be complete sentences

Thanks for catching that, I'll fix it before applying.

I'll apply the patch this evening without the trailing whitespace
change; if there's a consensus that allowing trailing whitespace is
the best course, I'll post a separate patch for that shortly.

-Neil

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: minor doc improvements
Next
From: Tom Lane
Date:
Subject: Re: tighten input to float4/float8/oid