Skip to content

Commit 6976a4f

Browse files
author
Michael Meskes
committed
Fix float parsing in ecpg INFORMIX mode.
1 parent 4b0fbfd commit 6976a4f

File tree

1 file changed

+3
-2
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+3
-2
lines changed

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
5757
/* skip invalid characters */
5858
do {
5959
(*scan_length)++;
60-
} while (**scan_length != ' ' && **scan_length != '\0' && isdigit(**scan_length));
60+
} while (isdigit(**scan_length));
6161
return false;
6262
}
6363

@@ -401,7 +401,8 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
401401
if (isarray && *scan_length == '"')
402402
scan_length++;
403403

404-
if (garbage_left(isarray, &scan_length, compat))
404+
/* no special INFORMIX treatment for floats */
405+
if (garbage_left(isarray, &scan_length, ECPG_COMPAT_PGSQL))
405406
{
406407
ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
407408
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy