Michael Meskes
4130b2c1fd
Check for out of memory when allocating sqlca.
...
Patch by Michael Paquier
2015-06-15 14:22:54 +02:00
Michael Meskes
3e2a17eecc
Fix memory leak in ecpglib's connect function.
...
Patch by Michael Paquier
2015-06-15 14:22:50 +02:00
Michael Meskes
8404037d89
Do not use an empty hostname.
...
When trying to connect to a given database libecpg should not try using an
empty hostname if no hostname was given.
2014-01-01 12:40:28 +01:00
Bruce Momjian
927d61eeff
Run pgindent on 9.2 source tree in preparation for first 9.3
...
commit-fest.
2012-06-10 15:20:04 -04:00
Peter Eisentraut
8dd4d10d48
ecpg: Fix rare memory leaks
...
found by Coverity
2012-03-08 22:21:12 +02:00
Michael Meskes
84ff5b5db5
In ecpglib rewrote code that used strtok_r to not use library functions
...
anymore. This way we don't have to worry which compiler on which OS offers
which version of strtok.
2012-02-19 14:50:14 +01:00
Michael Meskes
45b7ab6b59
gcc on Windows does not know about strtok_s.
2012-02-18 17:20:53 +01:00
Michael Meskes
e3155c97b0
Windows doesn't have strtok_r, so let's use strtok_s instead.
2012-02-18 15:56:39 +01:00
Michael Meskes
5e7710e725
Make sure all connection paramters are used in call to PQconnectdbParams.
2012-02-18 14:18:16 +01:00
Michael Meskes
0ee23b53be
Allow the connection keyword array to carry all seven items in ecpglib.
2012-02-06 20:58:57 +01:00
Michael Meskes
fc211f8277
Applied Peter's patch to PQconnectdbParams in ecpglib instead of the old
...
PQconectdb.
2012-02-04 01:19:10 +01:00
Michael Meskes
8cf82ac53e
Ecpglib stores variables that are used in DECLARE statements in a global list.
...
This list is now freed when the last connection has been closed.
Closes : #6366
2012-01-05 14:08:45 +01:00
Bruce Momjian
bf50caf105
pgindent run before PG 9.1 beta 1.
2011-04-10 11:42:00 -04:00
Robert Haas
5aa446c961
Cleanup various comparisons with the constant "true".
...
Itagaki Takahiro, with slight modifications.
2010-11-14 21:03:48 -05:00
Michael Meskes
35d5d962e1
Some cleanup in ecpg code:
...
Use bool as type for booleans instead of int.
Do not implicitely cast size_t to int.
Make the compiler stop complaining about unused variables by adding an empty statement.
2010-11-02 18:12:01 +01:00
Michael Meskes
816b008eaf
Applied patch by Itagaki Takahiro to fix incorrect status calculation in
...
ecpglib. Instead of parsing the statement just as ask the database server. This
patch removes the whole client side track keeping of the current transaction
status.
2010-10-14 17:55:07 +02:00
Magnus Hagander
9f2e211386
Remove cvs keywords from all files.
2010-09-20 22:08:53 +02:00
Bruce Momjian
239d769e7e
pgindent run for 9.0, second run
2010-07-06 19:19:02 +00:00
Michael Meskes
71a185a24d
ECPG connect routine only checked for NULL to find empty parameters, but user and password can also be "".
2010-05-07 19:35:03 +00:00
Bruce Momjian
d747140279
8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
...
provided by Andrew.
2009-06-11 14:49:15 +00:00
Peter Eisentraut
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
Michael Meskes
e05c5a908b
Applied patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> to
...
fix segfault on non-glibc systems.
2008-12-17 16:52:07 +00:00
Peter Eisentraut
e1bdd07c3c
Add localization support to ecpg.
...
Author: Euler Taveira de Oliveira <euler@timbira.com>
2008-05-16 15:20:04 +00:00
Michael Meskes
9d7b256eeb
- Moved from PQsetdbLogin to PQconnectDB.
...
- Correctly parse connect options.
- Changed regression tests accordingly.
2008-03-27 07:56:02 +00:00
Michael Meskes
f9e083fd30
Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
...
Removed one include file from connect-test1.
2008-03-20 16:29:45 +00:00
Bruce Momjian
fdf5a5efb7
pgindent run for 8.3.
2007-11-15 21:14:46 +00:00
Michael Meskes
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
Michael Meskes
c4a6c2f871
Hopefully fixed some stuff that causes Windows builds to fail.
2007-10-03 08:55:23 +00:00
Michael Meskes
0c2eb200d6
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> added thread-safe
...
descriptor handling
2007-10-02 09:50:00 +00:00
Michael Meskes
60e83cec57
Applied another patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
...
to get memory allocation thread-safe. He also did some cleaning up.
2007-09-30 11:38:48 +00:00
Michael Meskes
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
Michael Meskes
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
Michael Meskes
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
Michael Meskes
d3e131e062
- Changed some whitespacing in connect statement.
...
- Made some chars const as proposed by Stefan Huehner <stefan@huehner.org>.
- Synced parser and keyword lists.
- Copied two token parsing from backend parser to ecpg parser.
- Also added a test case for this.
2007-03-17 19:25:24 +00:00
Michael Meskes
b8f611cf4b
Simplified regression handling
...
Added patch by Joachim to work around OpenBSD bug in regression suite.
2007-01-12 10:00:14 +00:00
Michael Meskes
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
Michael Meskes
0c96e42797
Applied patch by Peter Harris to free auto_mem structure on connect
2006-11-08 10:46:47 +00:00
Bruce Momjian
f99a569a2e
pgindent run for 8.2.
2006-10-04 00:30:14 +00:00
Michael Meskes
b1710339ba
Fixed parser and library to allow empty database names.
...
Streamlined connection name parsing.
Added Joachim's patch to shorten paths before diffing.
2006-08-29 12:24:52 +00:00
Michael Meskes
99a5619e7b
- Enabled single-quoted connection targets.
...
- Fixed a memory leak/segfault in unsuccessful connection.
- Some changes to test files.
2006-08-27 16:15:42 +00:00
Michael Meskes
ab6aa40b64
Applied patch for VPATH builds by Alvaro Herrera <alvherre@commandprompt.com>
...
Merged dyntest.pgc and dyntest2.pgc.
Hopefully fixed the last Coverity reports (finally)
2006-08-13 10:18:31 +00:00
Michael Meskes
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
Michael Meskes
9e76b4c7c5
And one more:
...
Connection identifier has to be unique
2006-07-28 10:10:42 +00:00
Michael Meskes
3f9aace723
Added some more coverity report patches send in by Martijn van Oosterhout <kleptog@svana.org>.
2006-06-21 11:38:07 +00:00
Michael Meskes
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
Michael Meskes
aaf125f8df
Do not use already free'ed errmsg, bug found by Joachim Wieland
...
<joachim.wieland@credativ.de>
2006-06-19 09:19:49 +00:00
Michael Meskes
150131d9d9
- Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
...
- Replaced all strdup() calls by ECPGstrdup().
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
2005-11-30 12:49:49 +00:00
Bruce Momjian
1dc3498251
Standard pgindent run for 8.1.
2005-10-15 02:49:52 +00:00
Michael Meskes
9dc2e6deaf
Added patch by Philip Yarra <philip.yarra@internode.on.net> for a bug in thread support.
2005-04-14 10:08:57 +00:00
Michael Meskes
1fbdb6bc9f
Fixed segfault in connect when specifying no database name.
2004-12-30 09:36:37 +00:00