Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb8961a

Browse files
author
Michael Meskes
committed
Added patch to temporarily disable locale for descriptors too (Christof)
1 parent9d25b39 commitcb8961a

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,5 +1211,9 @@ Sat Jan 12 22:04:02 CET 2002
12111211
Fri Jan 18 16:49:02 CET 2002
12121212

12131213
- Accept subsequent commits.
1214+
1215+
Wed Jan 23 17:35:23 CET 2002
1216+
1217+
- Added patch to temporarily disable locale for descriptors too (Christof).
12141218
- Set ecpg version to 2.9.0.
12151219
- Set library version to 3.3.0.

‎src/interfaces/ecpg/lib/descriptor.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* dynamic SQL support routines
22
*
3-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/descriptor.c,v 1.21 2002/01/11 14:43:11 meskes Exp $
3+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/descriptor.c,v 1.22 2002/01/23 16:34:06 meskes Exp $
44
*/
55

66
#include"postgres_fe.h"
@@ -330,11 +330,22 @@ ECPGget_desc(int lineno, char *desc_name, int index,...)
330330
if (data_var.type!=ECPGt_EORT)
331331
{
332332
structstatementstmt;
333+
char*oldlocale;
334+
335+
/* Make sure we do NOT honor the locale for numeric input */
336+
/* since the database gives the standard decimal point */
337+
oldlocale=strdup(setlocale(LC_NUMERIC,NULL));
338+
setlocale(LC_NUMERIC,"C");
339+
333340
memset (&stmt,0,sizeofstmt);
334341
stmt.lineno=lineno;
342+
335343
/* desparate try to guess something sensible */
336344
stmt.connection=ECPGget_connection(NULL);
337345
ECPGstore_result(ECPGresult,index,&stmt,&data_var);
346+
347+
setlocale(LC_NUMERIC,oldlocale);
348+
ECPGfree(oldlocale);
338349
}
339350
elseif (data_var.ind_type!=ECPGt_NO_INDICATOR)
340351
{

‎src/interfaces/ecpg/test/header_test.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
execsqlincludesqlca;
2-
31
#include"stdlib.h"
42

53
staticvoid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp