| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Neil Conway <neilc(at)samurai(dot)com> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: tighten input to float4/float8/oid |
| Date: | 2004-03-04 04:58:14 |
| Message-ID: | 21489.1078376294@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Neil Conway <neilc(at)samurai(dot)com> writes:
> 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.
To do that we'd have to use separate code for I/O and casting. As
an example, this current behavior is unquestionably contrary to the
spec text I cited:
regression=# select ' 42'::text::int;
int4
------
42
(1 row)
regression=# select ' 42 '::text::int;
ERROR: invalid input syntax for integer: " 42 "
regression=#
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Claudio Natoli | 2004-03-04 05:08:00 | canonicalize_path: initdb.c -> port/path.c |
| Previous Message | Neil Conway | 2004-03-04 04:44:19 | Re: tighten input to float4/float8/oid |