Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 36b0f67

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent 7e5e7ab commit 36b0f67

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,3 +720,9 @@ Mon Nov 22 18:26:34 CET 1999
720720
- Clean up parser.
721721
- Set library version to 3.0.6.
722722
- Set ecpg version to 2.6.10.
723+
724+
Tue Nov 23 07:59:01 CET 1999
725+
726+
- Ignore locale setting in ECPGdo.
727+
- Set library version to 3.0.7.
728+

src/interfaces/ecpg/lib/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.51 1999/11/22 12:48:46 meskes Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.52 1999/11/23 10:32:16 meskes Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

1313
NAME= ecpg
1414
SO_MAJOR_VERSION= 3
15-
SO_MINOR_VERSION= 0.6
15+
SO_MINOR_VERSION= 0.7
1616

1717
SRCDIR= @top_srcdir@
1818
include $(SRCDIR)/Makefile.global

src/interfaces/ecpg/lib/ecpglib.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <stdarg.h>
1919
#include <string.h>
2020
#include <ctype.h>
21+
#include <locale.h>
2122

2223
#include <libpq-fe.h>
2324
#include <libpq/pqcomm.h>
@@ -656,7 +657,6 @@ ECPGexecute(struct statement * stmt)
656657
}
657658
else
658659
{
659-
/* sqlca.sqlerrd[2] = 0;*/
660660
var = stmt->outlist;
661661
switch (PQresultStatus(results))
662662
{
@@ -1050,6 +1050,11 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
10501050
struct statement *stmt;
10511051
struct connection *con = get_connection(connection_name);
10521052
bool status;
1053+
char *locale = setlocale(LC_NUMERIC, NULL);
1054+
1055+
/* Make sure we do NOT honor the locale for numeric input/output */
1056+
/* since the database wants teh standard decimal point */
1057+
setlocale(LC_NUMERIC, "C");
10531058

10541059
if (!ecpg_init(con, connection_name, lineno))
10551060
return(false);
@@ -1069,6 +1074,9 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
10691074

10701075
status = ECPGexecute(stmt);
10711076
free_statement(stmt);
1077+
1078+
/* and reser value so our application is not affected */
1079+
setlocale(LC_NUMERIC, locale);
10721080
return (status);
10731081
}
10741082

0 commit comments

Comments
 (0)