summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/data.c
AgeCommit message (Collapse)Author
2017-11-07Fix unportable usage of <ctype.h> functions.Tom Lane
isdigit(), isspace(), etc are likely to give surprising results if passed a signed char. We should always cast the argument to unsigned char to avoid that. Error in commit 63d6b97fd, found by buildfarm member gaur. Back-patch to 9.3, like that commit.
2017-11-03Improve error message for incorrect number inputs in libecpg.Michael Meskes
2017-11-02Fix float parsing in ecpg INFORMIX mode.Michael Meskes
2017-11-01Make sure ecpglib does accepts digits behind decimal point even for integers inMichael Meskes
Informix mode. Spotted and fixed by 高增琦 <pgf00a@gmail.com>
2016-08-01Fixed array checking code for "unsigned long long" datatypes in libecpg.Michael Meskes
2015-09-19Let compiler handle size calculation of bool types.Michael Meskes
Back in the day this did not work, but modern compilers should handle it themselves.
2015-06-15Check for out of memory when allocating sqlca.Michael Meskes
Patch by Michael Paquier
2015-05-23pgindent run for 9.5Bruce Momjian
2015-02-25Remove null-pointer checks that are not needed.Michael Meskes
If a pointer is guaranteed to carry information there is no need to check for NULL again. Patch by Michael Paquier.
2015-02-10Fixed array handling in ecpg.Michael Meskes
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.
2014-05-06pgindent run for 9.4Bruce Momjian
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
2014-05-06Fix handling of array of char pointers in ecpglib.Michael Meskes
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>
2013-11-26ECPG: Fix offset to NULL/size indicator array.Michael Meskes
Patch by Boszormenyi Zoltan <zb@cybertec.at>
2012-10-05Fixed test for array boundary.Michael Meskes
Instead of continuing if the next character is not an array boundary get_data() used to continue only on finding a boundary so it was not able to read any element after the first.
2011-12-27Standardize treatment of strcmp() return valuePeter Eisentraut
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-05-25Replace self written 'long long int' configure test by standard ↵Michael Meskes
'AC_TYPE_LONG_LONG_INT' macro call.
2010-05-20Ecpg now accepts "long long" datatypes even if "long" is 64bit wide. This ↵Michael Meskes
used to cover the equally long "long long" type. This patch closes bug #5464.
2010-02-27Insert a hack into get_float8_nan (both core and ecpg copies) to deal withTom Lane
the fact that NetBSD/mips is currently broken, as per buildfarm member pika. Also add regression tests to ensure that get_float8_nan and get_float4_nan are exercised even on platforms where they are not needed by float8in/float4in. Zoltán Böszörményi and Tom Lane
2010-02-26pgindent run for 9.0Bruce Momjian
2010-02-04Streamlined array handling code in libecpg a little bit, in the process ↵Michael Meskes
fixing yet another incorrect log output.
2010-02-02Fixed NaN/Infinity problems in ECPG for float/double/numeric/decimal by ↵Michael Meskes
making it OS independant. Patch done by Zoltán Böszörményi.
2009-12-31Redefine Datum as uintptr_t, instead of unsigned long.Tom Lane
This is more in keeping with modern practice, and is a first step towards porting to Win64 (which has sizeof(pointer) > sizeof(long)). Tsutomu Yamada, Magnus Hagander, Tom Lane
2009-11-27If no result is given NOTFOUND should be returned. Check for empty resultMichael Meskes
string too.
2009-10-01Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory leak in ↵Michael Meskes
decimal handling.
2009-08-07Remove unused ecpg variable.Bruce Momjian
2009-08-07Added STRING datatype for Informix compatibility mode. This work isMichael Meskes
based on a patch send in by Böszörményi Zoltán <zb@cybertec.at>.
2009-01-15NLS cleanup in ecpglibPeter Eisentraut
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.
2008-05-16Add localization support to ecpg.Peter Eisentraut
Author: Euler Taveira de Oliveira <euler@timbira.com>
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-10-03Cleaned up ecpglib and renamed functions that do not need to be exported.Michael Meskes
Created export list for ecpglib.
2007-05-10Added some more error logging.Michael Meskes
2007-01-12Simplified regression handlingMichael Meskes
Added patch by Joachim to work around OpenBSD bug in regression suite.
2007-01-11Applied Joachim's patch for a --regression option.Michael Meskes
Made this option mark the .c files, so the environment variable is no longer needed. Created a special MinGW file with the special error message. Do not print port into log file when running regression tests.
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-08-24Fixed of by one variable size.Michael Meskes
2006-08-08Made parser check for valid copy to/from stdin/stdout combinations.Michael Meskes
Lots of small changes in regression test suite
2006-06-21Added fixed from the coverity report send in by Joachim Wieland ↵Michael Meskes
<joe@mcknight.de> Added missing error handling in a few functions in ecpglib
2006-06-06Fixed two more memory leaks in ecpglib.Michael Meskes
Synced parser.
2006-01-17Data transferred binary is now put into the variables verbatim.Michael Meskes
Also added a test case for a binary cursor.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-08-24 - Check for NULL before checking whether argument is an array.Michael Meskes
- Remove stary character from string quoting. - Fixed check to report missing varchar pointer implementation.
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-07-04Made sure SET DESCRIPTOR accepts all data types including constants.Michael Meskes
2004-06-28Arrays can be read as arrays or as character strings now.Michael Meskes
2004-06-27- Only use typedefs inside their scope.Michael Meskes
- Variables that are out of scope, were not removed all the time. - Make a varchar NULL set everything to 0 when not using indicators. - Synced parser.
2004-05-05- Fixed bug in adjust_informix that treated arrays as simple variables.Michael Meskes
- Synced parser again. - Synced lexer.
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-11-08Made sure an internal array is not treated as a user defined one.Michael Meskes
2003-09-20- Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.Michael Meskes
- Added protecting defines to include files.