Re: [HACKERS] casting zero-length strings

2004-02-19 Thread Neil Conway
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Either way, we should make them a WARNING for 7.5, then error in > 7.6. Ok, I'll make this change soon. If we end up marking more 7.5 changes using this mechanism (i.e. deprecate for 7.5, disallow for 7.6), we could use an #ifdef symbol to mar

Re: [HACKERS] casting zero-length strings

2004-02-16 Thread Christopher Kings-Lynne
Yes, surely, unless someone wants to argue for reverting that change to pg_atoi. I can't see a reason for having them act inconsistently. While we are at it we should make sure these functions are all on the same page about allowing leading/trailing whitespace. I seem to recall that the spec says

Re: [HACKERS] casting zero-length strings

2004-02-16 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Chris KL recently pointed out to me that we currently don't raise an > error when attempting to cast a zero-length string to a float: > Whereas int and numeric reject zero-length strings: > So, should we fix oid and float? Yes, surely, unless someone want

[HACKERS] casting zero-length strings

2004-02-16 Thread Neil Conway
Chris KL recently pointed out to me that we currently don't raise an error when attempting to cast a zero-length string to a float: nconway=# select ''::float8; float8 0 (1 row) nconway=# select ''::float4; float4 0 (1 row) Similarly for oid: nconway=# select '':