Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
fecbeedc
Commit
fecbeedc
authored
Oct 02, 2001
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-added Tom's patch fixing my setlocale patch. I accidently
deleted it.
parent
f02ffdf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+5
-0
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+14
-8
No files found.
src/interfaces/ecpg/ChangeLog
View file @
fecbeedc
...
...
@@ -1107,5 +1107,10 @@ Mon Okt 1 13:49:40 CEST 2001
- Fixed truncate bug.
- Added patch by Christof Petig <christof.petig@wtal.de> to clean up
ecpglib.
TUe Okt 2 16:09:26 CEST 2001
- Re-added Tom's patch fixing my setlocale patch. I accidently
deleted it.
- Set ecpg version to 2.9.0.
- Set library version to 3.3.0.
src/interfaces/ecpg/lib/execute.c
View file @
fecbeedc
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.2
6 2001/10/01 12:02
:28 meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.2
7 2001/10/02 14:08
:28 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -1040,23 +1040,26 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
va_list
args
;
struct
statement
*
stmt
;
struct
connection
*
con
=
get_connection
(
connection_name
);
bool
status
=
true
;
char
*
locale
;
bool
status
;
char
*
old
locale
;
/* Make sure we do NOT honor the locale for numeric input/output */
/* since the database wants the standard decimal point */
locale
=
setlocale
(
LC_NUMERIC
,
"C"
);
oldlocale
=
strdup
(
setlocale
(
LC_NUMERIC
,
NULL
));
setlocale
(
LC_NUMERIC
,
"C"
);
if
(
!
ecpg_init
(
con
,
connection_name
,
lineno
))
{
setlocale
(
LC_NUMERIC
,
locale
);
setlocale
(
LC_NUMERIC
,
oldlocale
);
free
(
oldlocale
);
return
(
false
);
}
va_start
(
args
,
query
);
if
(
create_statement
(
lineno
,
con
,
&
stmt
,
query
,
args
)
==
false
)
{
setlocale
(
LC_NUMERIC
,
locale
);
setlocale
(
LC_NUMERIC
,
oldlocale
);
free
(
oldlocale
);
return
(
false
);
}
va_end
(
args
);
...
...
@@ -1067,7 +1070,8 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
free_statement
(
stmt
);
ECPGlog
(
"ECPGdo: not connected to %s
\n
"
,
con
->
name
);
ECPGraise
(
lineno
,
ECPG_NOT_CONN
,
NULL
);
setlocale
(
LC_NUMERIC
,
locale
);
setlocale
(
LC_NUMERIC
,
oldlocale
);
free
(
oldlocale
);
return
false
;
}
...
...
@@ -1075,7 +1079,9 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
free_statement
(
stmt
);
/* and reset locale value so our application is not affected */
setlocale
(
LC_NUMERIC
,
locale
);
setlocale
(
LC_NUMERIC
,
oldlocale
);
free
(
oldlocale
);
return
(
status
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment