mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
*** empty log message ***
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.65 2000/03/30 11:41:34 meskes Exp $
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.66 2000/05/17 06:03:13 meskes Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
NAME= ecpg
|
||||
SO_MAJOR_VERSION= 3
|
||||
SO_MINOR_VERSION= 1.0
|
||||
SO_MINOR_VERSION= 1.1
|
||||
|
||||
SRCDIR= @top_srcdir@
|
||||
include $(SRCDIR)/Makefile.global
|
||||
|
||||
@@ -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 */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user