1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
d278ff3b26 Check for out of memory when allocating sqlca.
Patch by Michael Paquier

Conflicts:
	src/interfaces/ecpg/ecpglib/connect.c
2015-06-15 14:27:39 +02:00
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
ddd8416e40 ECPG: Fix offset to NULL/size indicator array.
Patch by Boszormenyi Zoltan <zb@cybertec.at>
2013-11-26 17:31:45 +01:00
6b0d71bf71 Fixed test for array boundary.
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.
2012-10-05 17:05:53 +02: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
4d17a2146c Insert a hack into get_float8_nan (both core and ecpg copies) to deal with
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-27 21:53:21 +00:00
65e806cba1 pgindent run for 9.0 2010-02-26 02:01:40 +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
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
85d02a6586 Redefine Datum as uintptr_t, instead of unsigned long.
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-12-31 19:41:37 +00:00
d7d5c6857b If no result is given NOTFOUND should be returned. Check for empty result
string too.
2009-11-27 13:32:17 +00:00
fabf75cffc Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory leak in decimal handling. 2009-10-01 18:03:54 +00:00
d2e7afe54a Remove unused ecpg variable. 2009-08-07 16:47:53 +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
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
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
b1110aaa8b Added some more error logging. 2007-05-10 14:29:21 +00:00
b8f611cf4b Simplified regression handling
Added patch by Joachim to work around OpenBSD bug in regression suite.
2007-01-12 10:00:14 +00:00
5b88b85cad Applied Joachim's patch for a --regression option.
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.
2007-01-11 15:47:34 +00:00
f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
e8d1dcbfde Fixed of by one variable size. 2006-08-24 10:35:58 +00:00
6e11202dbe Made parser check for valid copy to/from stdin/stdout combinations.
Lots of small changes in regression test suite
2006-08-08 11:51:25 +00:00
a829da152c Added fixed from the coverity report send in by Joachim Wieland <joe@mcknight.de>
Added missing error handling in a few functions in ecpglib
2006-06-21 10:24:41 +00:00
0251602fc9 Fixed two more memory leaks in ecpglib.
Synced parser.
2006-06-06 11:31:55 +00:00
f3dda5be89 Data transferred binary is now put into the variables verbatim.
Also added a test case for a binary cursor.
2006-01-17 19:49:23 +00:00
1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
f417ebf03a - Check for NULL before checking whether argument is an array.
- Remove stary character from string quoting.
        - Fixed check to report missing varchar pointer implementation.
2005-08-24 10:34:19 +00:00
b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
8715789928 Made sure SET DESCRIPTOR accepts all data types including constants. 2004-07-04 15:02:24 +00:00
e48cfacb84 Arrays can be read as arrays or as character strings now. 2004-06-28 11:47:42 +00:00
03ad5da8f8 - Only use typedefs inside their scope.
- 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-06-27 12:28:42 +00:00
e845adf31f - Fixed bug in adjust_informix that treated arrays as simple variables.
- Synced parser again.
- Synced lexer.
2004-05-05 15:03:04 +00:00
969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
87758314ca Made sure an internal array is not treated as a user defined one. 2003-11-08 19:46:27 +00:00
f604b39c2f - Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.
- Added protecting defines to include files.
2003-09-20 09:10:09 +00:00
df974272ec Removed superfluous return statement in get_data. 2003-09-19 14:06:21 +00:00
723a9bde33 - Accept output variables for FETCH in DECLARE statement.
- Synced parser.
- Allowed C variables to carry the name of prepared statements.
- Added Informix handling of datatype converion errors.
2003-09-18 13:12:23 +00:00
fcdf0e22fc - Added Dave patch for Informix handling of numeric/int conversion.
- Changed all new datatypes to lowercase.
- Fixed rounding bug in numerical types.
2003-09-09 10:46:42 +00:00
089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
4f7df90db0 Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,
rather than parsing the message.  Add some documentation about embedded
SQL.
2003-08-01 13:53:36 +00:00
7a9c074cba - Added some Informix error codes in Informix mode.
- Added just another pgtypeslib function.
2003-08-01 08:21:04 +00:00
45d8f61ff2 Added more compat stuff ot the parser. 2003-07-18 14:32:56 +00:00
c15b66ef82 Allow blanks at the end of numerical values. 2003-07-17 11:27:55 +00:00
f207718b0c More informix fixes. 2003-07-08 12:11:35 +00:00
2bdd2e5dcf Use ISO dates in pgtypeslib by default.
Applied patch by Philip Yarra to fix some thread issues.
Added a new data type "decimal" which is mostly the same as our
	"numeric" but uses a fixed length array to store the digits. This is
	for compatibility with Informix and maybe others.
2003-07-01 12:40:52 +00:00
4505653e54 Added just another compatibility level for Informix. 2003-06-26 11:37:05 +00:00