1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

*** empty log message ***

This commit is contained in:
Michael Meskes
2000-05-17 06:03:14 +00:00
parent 76da5b80b1
commit e39a118694
6 changed files with 44 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <string.h>
#include <ecpgtype.h>
#include <ecpglib.h>
@@ -26,8 +27,18 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
ECPGraise(lineno, ECPG_DATA_NOT_ARRAY, NULL);
return (false);
}
else
++pval;
switch (type)
{
case ECPGt_char:
case ECPGt_unsigned_char:
case ECPGt_varchar:
break;
default:
pval++;
break;
}
}
/* We will have to decode the value */
@@ -144,7 +155,14 @@ get_data(PGresult *results, int act_tuple, int act_field, int lineno,
case ECPGt_double:
if (pval)
{
dres = strtod(pval, &scan_length);
if (isarray && *pval == '"')
dres = strtod(pval + 1, &scan_length);
else
dres = strtod(pval, &scan_length);
if (isarray && *scan_length == '"')
scan_length++;
if ((isarray && *scan_length != ',' && *scan_length != '}')
|| (!isarray && *scan_length != '\0')) /* Garbage left */
{