aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
Commit message (Collapse)AuthorAge
...
* Change wildcard cerfificate mapping to be much simler - we now only matchMagnus Hagander2008-12-02
| | | | | | | | the * character at the beginning of a pattern, and it does not match subdomains. Since this means we no longer need fnmatch, remove the imported implementation from port, along with the autoconf check for it.
* Tweak new PQExpBufferBroken macro to suppress warnings from pickierTom Lane2008-11-26
| | | | versions of gcc.
* Adjust the behavior of the PQExpBuffer code to make it have well-definedTom Lane2008-11-26
| | | | | | | | | results (ie, an empty "broken" buffer) if memory overrun occurs anywhere along the way to filling the buffer. The previous coding would just silently discard portions of the intended buffer contents, as exhibited in trouble report from Sam Mason. Also, tweak psql's main loop to correctly detect and report such overruns. There's probably much more that should be done in this line, but this is a start.
* Remove PGINTERVALSTYLE from the set of special environment variables forTom Lane2008-11-25
| | | | | | | | | libpq. As noted by Peter, adding this variable created a risk of unexpected connection failures when talking to older server versions, and since it doesn't do anything you can't do with PGOPTIONS, it doesn't seem really necessary. Removing it does occasion a few extra lines in pg_regress.c, but saving a getenv() call per libpq connection attempt is perhaps worth that anyway.
* Disable FNM_CASEFOLD. Need a proper solution later, but just commentMagnus Hagander2008-11-24
| | | | it out for now so the buildfarm recovers.
* Add support for matching wildcard server certificates to the new SSL code.Magnus Hagander2008-11-24
| | | | | This uses the function fnmatch() which is not available on all platforms (notably Windows), so import the implementation from NetBSD into src/port.
* Fix libpq certificate validation for SSL connections.Magnus Hagander2008-11-13
| | | | | | | Add config parameter "sslverify" to control the verification. Default is to do full verification. Clean up some old SSL code that never really worked.
* Add a new GUC variable called "IntervalStyle" that decouples interval outputTom Lane2008-11-09
| | | | | | | | | | from DateStyle, and create a new interval style that produces output matching the SQL standard (at least for interval values that fall within the standard's restrictions). IntervalStyle is also used to resolve the conflict between the standard and traditional Postgres rules for interpreting negative interval input. Ron Mayer
* Fix incorrect comment in SSL codeMagnus Hagander2008-11-03
|
* Remove support for (insecure) crypt authentication.Magnus Hagander2008-10-28
| | | | This breaks compatibility with pre-7.2 versions.
* Add support for multiple error messages from libpq, by simply appending themMagnus Hagander2008-10-27
| | | | | | | | | after each other (since we already add a newline on each, this makes them multiline). Previously a new error would just overwrite the old one, so for example any error caused when trying to connect with SSL enabled would be overwritten by the error message form the non-SSL connection when using sslmode=prefer.
* Update standalong libpq makefiles for msvc and bcc to work with the newMagnus Hagander2008-10-27
| | | | | | libpq events code. Hiroshi Saito
* Remove notes from the frontend SSL source that are incorrect orMagnus Hagander2008-10-24
| | | | end-user documentation that lives in the actual documentation.
* Fix memory leak when using gsslib parameter in libpq connectionsMagnus Hagander2008-10-23
|
* Link libpq with libgssapi if configure finds it, asMagnus Hagander2008-10-01
| | | | | | required by at least NetBSD. Markus Schaaf
* Get rid of pgpass_from_client tracking inside libpq --- given the conclusionTom Lane2008-09-22
| | | | | | | that presence of the password in the conninfo string must be checked *before* risking a connection attempt, there is no point in checking it afterwards. This makes the specification of PQconnectionUsedPassword() a bit simpler and perhaps more generally useful, too.
* Fix dblink_connect() so that it verifies that a password is supplied in theTom Lane2008-09-22
| | | | | | | | | | | | conninfo string *before* trying to connect to the remote server, not after. As pointed out by Marko Kreen, in certain not-very-plausible situations this could result in sending a password from the postgres user's .pgpass file, or other places that non-superusers shouldn't have access to, to an untrustworthy remote server. The cleanest fix seems to be to expose libpq's conninfo-string-parsing code so that dblink can check for a password option without duplicating the parsing logic. Joe Conway, with a little cleanup by Tom Lane
* Add a PQfireResultCreateEvents function to allow applications to mimic theTom Lane2008-09-19
| | | | | | sequence of operations that libpq goes through while creating a PGresult. Also, remove ill-considered "const" decoration on parameters passed to event procedures.
* Improve the recently-added libpq events code to provide more consistentTom Lane2008-09-19
| | | | | | | | guarantees about whether event procedures will receive DESTROY events. They no longer need to defend themselves against getting a DESTROY without a successful prior CREATE. Andrew Chernow
* Add an "events" system to libpq, whereby applications can get callbacks thatTom Lane2008-09-17
| | | | | | enable them to manage private data associated with PGconns and PGresults. Andrew Chernow and Merlin Moncure
* Avoid using sprintf() for a simple octal conversion in PQescapeByteaInternal.Tom Lane2008-09-10
| | | | | Improves performance, per suggestion from Rudolf Leitgeb (bug #4414). The backend did this right already, but not libpq.
* Make libpq on windows not try to send chunks larger than 64Kb.Magnus Hagander2008-08-20
| | | | | | | | | Per Microsoft knowledge base article Q201213, early versions of Windows fail when we do this. Later versions of Windows appear to have a higher limit than 64Kb, but do still fail on large sends, so we unconditionally limit it for all versions. Patch from Tom Lane.
* Synchronize Borland libpq makefile to match MSVC. Backpatch to 8.3.X.Bruce Momjian2008-08-16
|
* Fix standalone libpq build on win32.Magnus Hagander2008-06-27
| | | | Hiroshi Saito
* Add libpq comment about how to determine the format used for passingBruce Momjian2008-06-23
| | | | | | binary values. Add comments to libpq C function for parameter passing.
* Tweak libpq to avoid crashing due to incorrect buffer size calculation whenTom Lane2008-05-29
| | | | | | | | | | | | | | we are on a 64-bit machine (ie, size_t is wider than int) and someone passes in a query string that approaches or exceeds INT_MAX bytes. Also, just for paranoia's sake, guard against similar overflows in sizing the input buffer. The backend will not in the foreseeable future be prepared to send or receive strings exceeding 1GB, so I didn't take the more invasive step of switching all the buffer index variables from int to size_t; though someday we might want to do that. I have a suspicion that this is not the only such bug in libpq, but this fix is enough to take care of the crash reported by Francisco Reyes.
* Use CRITICAL_SECTION instead of Mutexes for thread-locking in libpq onMagnus Hagander2008-05-21
| | | | | | | Windows, for better performance. Per suggestion from Andrew Chernow, but not his patch since the underlying code was changed to deal with return values.
* Use isatty() test for pager on Win32; not sure why it was disabled forBruce Momjian2008-05-17
| | | | that platform.
* Add $PostgreSQL$ markers to a lot of files that were missing them.Andrew Dunstan2008-05-17
| | | | | | | | | | This particular batch was just for *.c and *.h file. The changes were made with the following 2 commands: find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *' find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o \( -name '*.[ch]' \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
* Implement error checking for pthreads calls in thread-safe mode. They reallyMagnus Hagander2008-05-16
| | | | | | | | | should always succeed, but in the likely event of a failure we would previously fall through *without locking* - the new code will exit(1). Printing the error message on stderr will not work for all applications, but it's better than nothing at all - and our API doesn't provide a way to return the error to the caller.
* Add more dependencies from libpgport required byMagnus Hagander2008-05-05
| | | | | | standalone msvc build of libpq. Hiroshi Saito
* Avoid using unnecessary pgwin32_safestat in libpq.Andrew Dunstan2008-04-16
|
* Make parameters in implementation have same const:ness as the ones inMagnus Hagander2008-04-10
| | | | the prototype. Silences msvc build warning.
* Implement a few changes to how shared libraries and dynamically loadablePeter Eisentraut2008-04-07
| | | | | | | | | | | | | | | modules are built. Foremost, it creates a solid distinction between these two types of targets based on what had already been implemented and duplicated in ad hoc ways before. Specifically, - Dynamically loadable modules no longer get a soname. The numbers previously set in the makefiles were dummy numbers anyway, and the presence of a soname upset a few packaging tools, so it is nicer not to have one. - The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and then override the rule to install foo.so instead) is removed. - Lots of duplicated code simplified.
* Use error message wordings for permissions checks on .pgpass and SSL privateTom Lane2008-03-31
| | | | | | | | | | | | key files that are similar to the one for the postmaster's data directory permissions check. (I chose to standardize on that one since it's the most heavily used and presumably best-wordsmithed by now.) Also eliminate explicit tests on file ownership in these places, since the ensuing read attempt must fail anyway if it's wrong, and there seems no value in issuing the same error message for distinct problems. (But I left in the explicit ownership test in postmaster.c, since it had its own error message anyway.) Also be more specific in the documentation's descriptions of these checks. Per a gripe from Kevin Hunter.
* More README src cleanups.Bruce Momjian2008-03-21
|
* Add libpq new API lo_import_with_oid() which is similar to lo_import()Tatsuo Ishii2008-03-19
| | | | except that lob's oid can be specified.
* Include -lgss in libpq link, if available. Bjorn MunchTom Lane2008-03-05
|
* Don't build the win32 support files in the all target, only in distprep andPeter Eisentraut2008-02-26
| | | | when they are actually needed as prerequisites.
* Create two separate libpq.rc's: One that is built at build time, and onePeter Eisentraut2008-02-26
| | | | | | that is shipped in the distribution, named libpq-dist.rc. This way the build system doesn't get upset when a distributed file is forcibly overwritten by during a normal build.
* Refactor the code that creates the shared library export files to appearPeter Eisentraut2008-02-26
| | | | only once in Makefile.shlib and not in four copies.
* Rename a libpq NOT_USED SSL function toBruce Momjian2008-02-16
| | | | | | verify_peer_name_matches_certificate(), clarify some of the function's variables and logic, and update a comment. This should make SSL improvements easier in the future.
* Bump minor library version numbers for 8.4.Bruce Momjian2008-02-13
|
* Stamp HEAD as 8.4devel.Tom Lane2008-02-13
|
* Fix pg_GSS_error to use conn->errorMessage more sanely, ie, actuallyTom Lane2008-01-31
| | | | | | work with the PQExpBuffer code instead of fighting it. This avoids an unnecessary limit on message length and fixes the latent bug that errorMessage.len wasn't getting set.
* Translation updatesPeter Eisentraut2008-01-31
|
* Translation updatesPeter Eisentraut2008-01-30
|
* Fix up closePGconn() so that PQreset() will work on GSSAPI/SSPI connections;Tom Lane2008-01-29
| | | | | | | the patch for those features put its cleanup code into freePGconn() which is really the wrong place. Remove redundant code from freePGconn() and add comments in hopes of preventing similar mistakes in future. Noticed while trying (futilely) to reproduce bug #3902.
* Arrange to ignore SIGPIPE during SSL_read() and SSL_shutdown(), as theseTom Lane2008-01-29
| | | | | | | | | are known to write on the socket sometimes and thus we are vulnerable to being killed by the signal if the server happens to go away unexpectedly. Noticed while trying (futilely) to reproduce bug #3902. This bug has been there all along, but since the situation is usually only of interest to developers, I chose not to back-patch the changes.
* Insert into getCopyDataMessage() the same logic that already existed in theTom Lane2008-01-17
| | | | | | | | | | | | main code path for enlarging libpq's input buffer in one swoop when needing to read a long data message. Without this, the code will double the buffer size, read more data, notice it still hasn't got the whole message, and repeat till it finally has a large enough buffer. Which wastes a lot of data-moving effort and also memory (since malloc probably can't do anything very useful with the freed-up smaller buffers). Not sure why this wasn't there already; certainly the COPY data path is a place where we're quite likely to see long data messages. I'm not backpatching though, since this is just a marginal performance issue rather than a real bug.