Commit graph

2593 commits

Author SHA1 Message Date
Michael Meskes
b4595d71f2 Moved some free() calls that coverity correctly complains about. 2006-06-25 10:00:11 +00:00
Michael Meskes
ca6667fef0 Added some more coverity report patches send in by Martijn van Oosterhout <kleptog@svana.org>. 2006-06-21 11:38:35 +00:00
Michael Meskes
289a3b73e2 Added fixes 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:31:45 +00:00
Michael Meskes
14f52896b8 Do not use already free'ed errmsg, bug found by Joachim Wieland
<joachim.wieland@credativ.de>
2006-06-19 09:20:22 +00:00
Michael Meskes
3066e8ab03 Fixed two memory leaks in ecpglib. 2006-06-06 11:36:12 +00:00
Tom Lane
1252a6a042 Remove pqsignalinquire(), which is unused and has portability issues. 2006-05-30 15:58:14 +00:00
Bruce Momjian
29dd673a94 Stamp releases 7.3.15, 7.4.13, and 8.0.8. 2006-05-21 20:28:35 +00:00
Tom Lane
94dec9114b Modify libpq's string-escaping routines to be aware of encoding considerations
and standard_conforming_strings.  The encoding changes are needed for proper
escaping in multibyte encodings, as per the SQL-injection vulnerabilities
noted in CVE-2006-2313 and CVE-2006-2314.  Concurrent fixes are being applied
to the server to ensure that it rejects queries that may have been corrupted
by attempted SQL injection, but this merely guarantees that unpatched clients
will fail rather than allow injection.  An actual fix requires changing the
client-side code.  While at it we have also fixed these routines to understand
about standard_conforming_strings, so that the upcoming changeover to SQL-spec
string syntax can be somewhat transparent to client code.

Since the existing API of PQescapeString and PQescapeBytea provides no way to
inform them which settings are in use, these functions are now deprecated in
favor of new functions PQescapeStringConn and PQescapeByteaConn.  The new
functions take the PGconn to which the string will be sent as an additional
parameter, and look inside the connection structure to determine what to do.
So as to provide some functionality for clients using the old functions,
libpq stores the latest encoding and standard_conforming_strings values
received from the backend in static variables, and the old functions consult
these variables.  This will work reliably in clients using only one Postgres
connection at a time, or even multiple connections if they all use the same
encoding and string syntax settings; which should cover many practical
scenarios.

Clients that use homebrew escaping methods, such as PHP's addslashes()
function or even hardwired regexp substitution, will require extra effort
to fix :-(.  It is strongly recommended that such code be replaced by use of
PQescapeStringConn/PQescapeByteaConn if at all feasible.
2006-05-21 20:20:05 +00:00
Bruce Momjian
833e84621c Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4,
and 8.0.  Later releases already patched.
2006-05-21 19:57:40 +00:00
Michael Meskes
46942e84d9 Fixed memory leak bugs found by Martijn Oosterhout. 2006-04-24 09:45:57 +00:00
Tom Lane
8f7fce2fd6 Fix ancient memory leak in PQprintTuples(); our code no longer uses this
routine, but perhaps some applications do.  Found by Martijn van Oosterhout
using Coverity.
2006-04-19 16:15:41 +00:00
Michael Meskes
8931dbf52a Fixed bug 2330: Wrong error code in case of a duplicate key 2006-03-19 12:30:17 +00:00
Bruce Momjian
5ae9c6138b Stamp releases for 2006-02-14 release 2006-02-12 18:41:53 +00:00
Neil Conway
8372956243 When using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not
a va_list. Christof Petig's previous patch made this change, but neglected
to update ecpglib/descriptor.c, resulting in a compiler warning (and a
likely runtime crash) on AMD64 and PPC.
2006-01-15 22:47:21 +00:00
Bruce Momjian
2a35aedd97 Stamp relesae 8.0.6. 2006-01-05 04:00:29 +00:00
Neil Conway
6b0e64431c Remove DOS line endings ("\r\n") from several .po files. DOS line endings
are inconsistent with the rest of the .po files, and apparently cause
problems for Sun's cc. Per report on IRC from "bitvector2".
2006-01-01 10:14:59 +00:00
Tom Lane
499dad06f2 Stamp 8.0.5. 2005-12-09 20:49:38 +00:00
Michael Meskes
f9bdaeeb34 - Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
- Replaced all strdup() calls by ECPGstrdup().
2005-11-30 12:51:07 +00:00
Bruce Momjian
7df6dfdda7 [ Backpatch to 8.0.X.]
Also I fixed a bug in a bug fix I committed a few weeks ago. he check
for a varchar pointer was incomplete.

Michael Meskes
2005-10-14 01:50:23 +00:00
Tom Lane
73a71f50cd Stamp release 8.0.4. 2005-10-03 17:07:18 +00:00
Michael Meskes
39f27463b3 Fixed transaction command handling to not ignore savepoints and to correctly check for errors. 2005-09-12 11:58:33 +00:00
Michael Meskes
5576a611cd - Check for NULL before checking whether argument is an array.
- Removed stray character from string quoting.
	- Fixed check to report missing varchar pointer implementation.
2005-08-24 10:35:12 +00:00
Tom Lane
35a0fc32f5 Fix libpq memory leak during PQreset() --- closePGconn() was not
freeing all transient state of the PGconn object.
2005-07-13 15:26:06 +00:00
Tom Lane
a646e4874a Make libpq_gettext save and restore errno in a Windows-compatible way.
Also, back-patch fix into back branches.
2005-07-08 15:24:53 +00:00
Michael Meskes
53b4a1ce4b Added patch by Gavin Scott <gavin@planetacetech.com> for Intel 64bit hardware.
[One half already was committed with the last commit.]
2005-06-02 12:49:26 +00:00
Michael Meskes
d014a21624 Fixed memory leak in ecpglib by adding some missing free() commands. 2005-06-02 12:37:25 +00:00
Peter Eisentraut
9a1a986580 Translation updates 2005-05-25 08:37:22 +00:00
Tom Lane
17eb867e98 Stamp release 8.0.3. 2005-05-05 20:07:36 +00:00
Bruce Momjian
fbacd7838c Add WSACleanup() for Win32 socket cleanup.
Jason Erickson
2005-05-05 16:36:20 +00:00
Bruce Momjian
f22b3b2760 Improve cleanup from win32 client-only build. 2005-04-29 14:07:34 +00:00
Bruce Momjian
5f9d19cc23 Backpatch BCC compile changes to 8.0.X for psql. 2005-04-29 13:42:24 +00:00
Bruce Momjian
95cb42b968 Fix Borland makefile for libpq and improve it for psql.
Reorder MSC makefile to be more consistent and easier to maintain.
2005-04-29 04:21:39 +00:00
Michael Meskes
c61d1c95ea Added patch by Philip Yarra <philip.yarra@internode.on.net> for a bug in thread support. 2005-04-14 10:09:20 +00:00
Tom Lane
7dbded2c9c Stamp 8.0.2. 2005-04-07 19:43:06 +00:00
Peter Eisentraut
774cdb9159 Translation updates 2005-04-02 18:45:19 +00:00
Bruce Momjian
d4f727808f Make additional stamps for 8.0.2. 2005-03-26 05:05:23 +00:00
PostgreSQL Daemon
507fc3c554 Tag for 8.0.2beta1 2005-03-26 03:46:33 +00:00
Tom Lane
8416036f5f Kerberos fixes from Magnus Hagander --- in theory Kerberos 5 auth
should work on Windows now.  Also, rename set_noblock to pg_set_noblock;
since it is included in libpq, the former name polluted application
namespace.
2005-03-25 00:35:20 +00:00
Michael Meskes
fc80f5fe73 Added patch by Christof Petig <christof@petig-baender.de> to work around gcc bug on powerpc and amd64. 2005-03-18 10:01:14 +00:00
Bruce Momjian
f38cb720d9 Increment all major version numbers in 8.0.X to force recompile of
client aplications so 7.4.X releases can be installed on the same
machine as 8.0.X.
2005-03-13 22:04:45 +00:00
Bruce Momjian
30854a53fe Properly implement "Response files" for bcc. Add URL's to describe the
feature for Win32 and bcc.
2005-03-07 21:11:07 +00:00
Bruce Momjian
ba6b067ce8 Tab indent all actions in bcc32.mak, and do it on win32.mak too for
consistency.  Backpatch only bcc32.mak to 8.0.X.
2005-02-27 22:38:29 +00:00
Bruce Momjian
a72fd004ba Add linking from /port to bcc makefile. 2005-02-25 15:57:41 +00:00
Bruce Momjian
bb7f5a7393 Try to get Borland CC to compile.
Backpatch to 8.0.X which doesn't work right now.
2005-02-21 21:22:46 +00:00
Michael Meskes
95b40b7f77 Fixed more parsing bugs in other CREATE statements. 2005-02-10 08:07:46 +00:00
Michael Meskes
ef006ded8e Fixed bug in parsing of CREATE AS statement. 2005-02-09 11:28:21 +00:00
Tom Lane
8097ce9f52 Stamp 8.0 branch as 8.0.1. 2005-01-30 19:17:49 +00:00
Tom Lane
1ded77722d Propagate ecpg core dump fix into 8.0 branch. 2005-01-26 22:52:01 +00:00
Tom Lane
953570a899 Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows.  Magnus Hagander
2005-01-26 19:24:21 +00:00
Peter Eisentraut
83ef003f2c Translation updates 2005-01-17 02:41:50 +00:00