1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-20 05:03:10 +03:00
Commit Graph

105 Commits

Author SHA1 Message Date
ce2fcc58ee Fixed array handling in ecpg.
When ecpg was rewritten to the new protocol version not all variable types
were corrected. This patch rewrites the code for these types to fix that. It
also fixes the documentation to correctly tell the status of array handling.

Conflicts:
	doc/src/sgml/ecpg.sgml
2015-02-11 11:30:11 +01:00
91c8c106fa Fix handling of array of char pointers in ecpglib.
When array of char * was used as target for a FETCH statement returning more
than one row, it tried to store all the result in the first element. Instead it
should dump array of char pointers with right offset, use the address instead
of the value of the C variable while reading the array and treat such variable
as char **, instead of char * for pointer arithmetic.

Patch by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
2014-05-06 13:24:13 +02:00
b108a77505 ecpg: Fix rare memory leaks
found by Coverity
2012-03-11 01:01:48 +02:00
ba24de13f6 Add missing format argument to ecpg_log() call 2011-09-08 22:10:43 +03:00
2cda30e757 Fix brace indentation of commit f8c7442201 to fit PostgreSQL style. 2011-09-02 09:48:19 +02:00
f8c7442201 In ecpglib restore LC_NUMERIC in case of an error. 2011-09-01 15:31:16 +02:00
77a7a57f7f Made ecpglib write double with a precision of 15 digits.
Patch originally by Akira Kurosawa <kurosawa-akira@mxc.nes.nec.co.jp>.
2011-07-18 16:29:59 +02:00
239d769e7e pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
29259531c7 Replace self written 'long long int' configure test by standard 'AC_TYPE_LONG_LONG_INT' macro call. 2010-05-25 17:28:20 +00:00
15ab0e9a60 Ecpg now accepts "long long" datatypes even if "long" is 64bit wide. This used to cover the equally long "long long" type. This patch closes bug #5464. 2010-05-20 22:10:46 +00:00
65e806cba1 pgindent run for 9.0 2010-02-26 02:01:40 +00:00
492eaefb90 Do not check nan values for infinity. Some system are not able to handle this.
By Zoltán Böszörményi
2010-02-16 18:41:23 +00:00
a96ad2fc74 Streamlined array handling code in libecpg a little bit, in the process fixing yet another incorrect log output. 2010-02-04 09:41:35 +00:00
45c88a55c2 Add #include <float.h> --- guessing the lack of this is why Windows
machines are all rejecting isinf() calls in this file.
2010-02-03 03:25:55 +00:00
cedae13017 Fixed NaN/Infinity problems in ECPG for float/double/numeric/decimal by making it OS independant.
Patch done by Zoltán Böszörményi.
2010-02-02 16:09:12 +00:00
f180856596 Fixed a few typos in ecpg. Two were in comments, the third made a log output reverse yes and no. 2010-01-29 15:57:01 +00:00
5bc75618e4 Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix problem in auto-prepare mode if the connection is closed and re-opened and the previously prepared query is issued again. 2010-01-22 14:13:03 +00:00
6d4a351fcb Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add sqlda support to
ecpg in both native and compatiblity mode.
2010-01-05 16:38:23 +00:00
fc19373993 Fixed incorrect memory management. 2009-09-03 10:24:48 +00:00
5d34af421d Added STRING datatype for Informix compatibility mode. This work is
based on a patch send in by Böszörményi Zoltán <zb@cybertec.at>.
2009-08-07 10:51:21 +00:00
d747140279 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
provided by Andrew.
2009-06-11 14:49:15 +00:00
14f29f640a Removed unsigned/signed mismatches. 2009-05-20 16:49:23 +00:00
0754b391f3 Removed some unneeded variables and comparisons 2009-05-20 16:13:18 +00:00
08ffa78483 Argh, wrong line copied again. 2009-02-03 08:55:45 +00:00
efd019fc94 Fixed copy&paste mistake that made library use uninitialized variable. 2009-02-03 08:48:29 +00:00
2d3c691146 Fixed auto allocation for binary data types. 2009-02-02 16:14:06 +00:00
cb05ab81a8 NLS cleanup in ecpglib
Replace leftover instances of _() by ecpg_gettext(), the latter being the
correct way to refer to the library's message catalog, instead of the one of
the program using the library.

Drop NLS support for ecpg_log(), which is a debugging instrument similar to
elog() in the backend.

We cannot support NLS in the ecpg compatlib, because that requires
ecpg_gettext, which is in ecpglib, which is not a dependency of compatlib.  It
doesn't seem worthwhile to worry about this, since the only translatable
string is "out of memory", and gettext probably won't be able to do much
without memory either.

Adjust messages to project style.
2009-01-15 11:52:55 +00:00
e1bdd07c3c Add localization support to ecpg.
Author: Euler Taveira de Oliveira <euler@timbira.com>
2008-05-16 15:20:04 +00:00
e04fa58dcd Fix unportable usages of tolower(). On signed-char machines, it is necessary
to explicitly cast the output back to char before comparing it to a char
value, else we get the wrong result for high-bit-set characters.  Found by
Rolf Jentsch.  Also, fix several places where <ctype.h> functions were being
called without casting the argument to unsigned char; this is likewise
unportable, but we keep making that mistake :-(.  These found by buildfarm
member salamander, which I will desperately miss if it ever goes belly-up.
2008-03-01 03:26:35 +00:00
fa0dc92fd8 - Fixed segfault in ecpg when using an array element.
- Free all memory in auto-prepare mode.
2008-02-07 11:09:13 +00:00
dbdc2e52a0 Re-enabled variables in fetch/move command. 2008-01-15 10:31:47 +00:00
149db6b6b7 Changed prototype for ECPGdo because some compilers don't like int/enum aliasing in there. 2008-01-13 11:53:16 +00:00
fdf5a5efb7 pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
7793c6ecca Cleaned up ecpglib and renamed functions that do not need to be exported.
Created export list for ecpglib.
2007-10-03 11:11:12 +00:00
0c2eb200d6 ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> added thread-safe
descriptor handling
2007-10-02 09:50:00 +00:00
d49b20fbe6 Applied patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> to get prepare thread-safe. 2007-09-26 10:57:01 +00:00
3e77c8c6c6 Removed superfluous ECPGfree() call. 2007-09-21 10:59:27 +00:00
635a0b9a86 - Finished major rewrite to use new protocol version
- Really prepare statements
- Added more regression tests
- Added auto-prepare mode
- Use '$n' for positional variables, '?' is still possible via ecpg option
- Cleaned up the sources a little bit
2007-08-14 10:01:54 +00:00
91411b6105 Fixed one memory leak in descriptor code.
Made sure ecpg deletes output file in case of an error.
2007-06-11 11:52:08 +00:00
c8577c6c7f Inlined two functions to get rid of va_list problems on some archs. 2007-04-27 06:56:11 +00:00
ddcb5bbf76 - Added patch by Magnus Hagander <magnus@hagander.net> to use native
win32 threads.
- Fixed regression tests to run threading tests.
2007-03-29 12:02:24 +00:00
153affd058 Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>. 2007-02-11 15:18:17 +00:00
fc8115d42f Cleaned up va_list handling. Hopefully this now works on all archs. 2007-02-02 08:58:23 +00:00
f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
9bade3ff84 Replaced double-quote-fix with a hopefully better version.
Use initializer string length as size for character strings.
Added ecpg_config.h file that is created via configure.
2006-08-23 12:01:53 +00:00
54f5527606 Descriptor values were quoted twice.
Fixed some regression test problems.
2006-08-22 12:46:18 +00:00
46d61eb218 Fixed a buffer overrun that was masked on Linux systems. 2006-08-18 16:30:53 +00:00
e6e61afe16 Fixed some memory bugs that somehow reappeared.
Also fixed a new Coverity report.
2006-08-09 09:08:32 +00:00
79a1a2ec6b Cleaned up log output a little bit more. 2006-08-08 15:30:39 +00:00
1fa6be6f69 ynced parser and keyword list.
Implemented EXEC SQL UNDEF.
Applied first version of the regression test patch by Joachim Wieland <joe@mcknight.de>.
2006-08-02 13:43:23 +00:00