aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
Commit message (Collapse)AuthorAge
* Backpatch pg_service.conf file change to not default dbname to matchBruce Momjian2003-12-19
| | | | service name.
* Must free the pgParameterStatus chain in freePGconn(). My fault,Tom Lane2003-10-18
| | | | well spotted by Neil Conway.
* Do not return from PQrequestCancel until postmaster has finishedTom Lane2003-10-02
| | | | | | processing the request; this ensures that the request won't be taken to cancel a subsequently-issued query. Race condition originally noted by Oliver Jowett in the context of JDBC, but libpq has it too.
* Message wording improvementsPeter Eisentraut2003-09-22
|
* Enable Win32 to compile libpq again, and enable SSL compiles on thatBruce Momjian2003-09-05
| | | | | | platform. Andreas Pflug
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Code review for sslmode patch: eliminate memory leak, avoid giving aTom Lane2003-08-01
| | | | | | completely useless error message in 'allow' case, don't retry connection at the sendauth stage (by then the server will either let us in or not, no point in wasting cycles on another try in the other SSL state).
* A visit from the message-style police ...Tom Lane2003-07-28
|
* here are the patches for psql on Win32:Bruce Momjian2003-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | psql4win32.patch - changes in the psql source code psql-ref.patch - changes in the documentation psql-ref.sgml (for new builtin variable WIN32_CONSOLE) To apply them use "patch -p 1" in the root directory of the postgres source directory. These patches fix the following problems of psql on Win32 (all changes only have effect #ifdef WIN32): a) Problem: Static library libpq.a did not work Solution: Added WSAStartup() in fe-connect.c b) Problem: Secret Password was echoed by psql Solution: Password echoing disabled in sprompt.c c) Problem: 8bit characters were displayed/interpreted wrong in psql This is due to the fact that the Win32 "console" uses a different encoding than the rest of the Windows system Solution: Introduced a new psql variable WIN32_CONSOLE When set with "\set WIN32_console", the function OemToChar() is applied after reading input and CharToOem() before displaying Output Christoph Dalitz
* At long last I put together a patch to support 4 client SSL negotiationBruce Momjian2003-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modes (and replace the requiressl boolean). The four options were first spelled out by Magnus Hagander <mha@sollentuna.net> on 2000-08-23 in email to pgsql-hackers, archived here: http://archives.postgresql.org/pgsql-hackers/2000-08/msg00639.php My original less-flexible patch and the ensuing thread are archived at: http://dbforums.com/t623845.html Attached is a new patch, including documentation. To sum up, there's a new client parameter "sslmode" and environment variable "PGSSLMODE", with these options: sslmode description ------- ----------- disable Unencrypted non-SSL only allow Negotiate, prefer non-SSL prefer Negotiate, prefer SSL (default) require Require SSL The only change to the server is a new pg_hba.conf line type, "hostnossl", for specifying connections that are not allowed to use SSL (for example, to prevent servers on a local network from accidentally using SSL and wasting cycles). Thus the 3 pg_hba.conf line types are: pg_hba.conf line types ---------------------- host applies to either SSL or regular connections hostssl applies only to SSL connections hostnossl applies only to regular connections These client and server options, the postgresql.conf ssl = false option, and finally the possibility of compiling with no SSL support at all, make quite a range of combinations to test. I threw together a test script to try many of them out. It's in a separate tarball with its config files, a patch to psql so it'll announce SSL connections even in absence of a tty, and the test output. The test is especially informative when run on the same tty the postmaster was started on, so the FATAL: errors during negotiation are interleaved with the psql client output. I saw Tom write that new submissions for 7.4 have to be in before midnight local time, and since I'm on the east coast in the US, this just makes it in before the bell. :) Jon Jensen
* Have a go at fixing various outstanding portability issues in code thatTom Lane2003-07-23
| | | | | | | | | was modified for IPv6. Use a robust definition of struct sockaddr_storage, do a proper configure test to see if ss_len exists, don't assume that getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to return the protocol we ask for, etc. This incorporates several outstanding patches from Kurt Roeckx, but I'm to blame for anything that doesn't work ...
* Change pqInternalNotice to accept a format string and args instead ofTom Lane2003-06-23
| | | | just a preformatted message; per suggestion by Sean Chittenden.
* Remove crypt.h from fe-connect.c --- not needed, and caused problems onBruce Momjian2003-06-23
| | | | Solaris with Open SSL version 0.9.7b
* Update libpq to make new features of FE/BE protocol available toTom Lane2003-06-21
| | | | client applications. Some editorial work on libpq.sgml, too.
* We neglected to set conn->raddr.salen, leading to breakage of CANCELTom Lane2003-06-20
| | | | and probably other stuff.
* Make libpq thread-safe with configure --with-threads option.Bruce Momjian2003-06-14
| | | | Lee Kindness
* Attached is the complete diff against current CVS.Bruce Momjian2003-06-12
| | | | | | Compiles on BCC 5.5 and VC++ 6.0 (with warnings). Karl Waclawek
* Back out patch that got bundled into another patch.Bruce Momjian2003-06-12
|
* New patch with corrected README attached.Bruce Momjian2003-06-12
| | | | | | Also quickly added mention that it may be a qualified schema name. Rod Taylor
* IPv6 cleanups.Bruce Momjian2003-06-12
| | | | | Kurt Roeckx Andrew Dunstan
* freeaddrinfo2() does need two parameters after all, per comment byTom Lane2003-06-09
| | | | | Kurt Roeckx. Add some documentation to try to prevent others from repeating my mistake.
* libpq can now talk to either 3.0 or 2.0 protocol servers. It first triesTom Lane2003-06-08
| | | | | | | protocol 3, then falls back to 2 if postmaster rejects the startup packet with an old-format error message. A side benefit of the rewrite is that SSL-encrypted connections can now be made without blocking. (I think, anyway, but do not have a good way to test.)
* Allow Win32 to compile under MinGW. Major changes are:Bruce Momjian2003-05-15
| | | | | | | | | | | | | | | Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
* Extended query protocol: parse, bind, execute, describe FE/BE messages.Tom Lane2003-05-05
| | | | Only lightly tested as yet, since libpq doesn't know anything about 'em.
* Missed some corner cases (PGSERVICE mostly)...Tom Lane2003-04-28
|
* Okay, I've had it with PQsetdbLogin having slightly different defaultsTom Lane2003-04-28
| | | | | than PQconnectdb. Reimplement the former to use the same code as the latter. Fix documentation omissions while at it.
* In the continuing saga of FE/BE protocol revisions, add reporting ofTom Lane2003-04-25
| | | | | | | | | | | | | initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.)
* Use closesocket() for all socket/pipe closing, because Win32 requiresBruce Momjian2003-04-25
| | | | it, and map that to close() on Unix.
* Infrastructure for upgraded error reporting mechanism. elog.c isTom Lane2003-04-24
| | | | | | | rewritten and the protocol is changed, but most elog calls are still elog calls. Also, we need to contemplate mechanisms for controlling all this functionality --- eg, how much stuff should appear in the postmaster log? And what API should libpq expose for it?
* Another round of protocol changes. Backend-to-frontend messages now allTom Lane2003-04-22
| | | | | | | | | | have length words. COPY OUT reimplemented per new protocol: it doesn't need \. anymore, thank goodness. COPY BINARY to/from frontend works, at least as far as the backend is concerned --- libpq's PQgetline API is not up to snuff, and will have to be replaced with something that is null-safe. libpq uses message length words for performance improvement (no cycles wasted rescanning long messages), but not yet for error recovery.
* Second round of FE/BE protocol changes. Frontend->backend messages nowTom Lane2003-04-19
| | | | have length counts, and COPY IN data is packetized into messages.
* First phase of FE/BE protocol modifications: new StartupPacket layoutTom Lane2003-04-17
| | | | | | with variable-width fields. No more truncation of long user names. Also, libpq can now send its environment-variable-driven SET commands as part of the startup packet, saving round trips to server.
* Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian2003-04-04
|
* Whack getaddrinfo() patch around until it works, more or less, onTom Lane2003-04-02
| | | | machines without IPv6. Or at least it works on HPUX 10.20 ...
* Simplify the socket handling code by supplying a replacement getaddrinfo()Peter Eisentraut2003-03-29
| | | | function if the OS doesn't provide one.
* PGRES_POLLING_ACTIVE is unused, keep for backward compatibility.Bruce Momjian2003-03-20
| | | | Lennert Buytenhek
* Improve error message.Peter Eisentraut2003-03-18
|
* Reorder crypt.h include for SunOS compile problem.Bruce Momjian2003-03-17
| | | | Fred Houweling
* This patch fixes a bunch of spelling mistakes in comments throughout theTom Lane2003-03-10
| | | | | | PostgreSQL source code. Neil Conway
* Fix for GUC client_encoding variable not being handledTatsuo Ishii2003-02-19
| | | | | | | | correctly. See following thread for more details. Subject: [HACKERS] client_encoding directive is ignored in postgresql.conf From: Tatsuo Ishii <t-ishii@sra.co.jp> Date: Wed, 29 Jan 2003 22:24:04 +0900 (JST)
* Fix some of the breakage from the IPV6 patch.Tom Lane2003-02-14
|
* Fix regression in .pgpass support. From Neil Conway.Tom Lane2003-01-30
|
* Fix pgpass to work with PQconnectDB().Bruce Momjian2003-01-08
| | | | | | Backpatch to 7.3.X. Report from ljb.
* Only set the database name if we find a match in the services file.Bruce Momjian2003-01-08
|
* Document libpq service capability, and add sample file.Bruce Momjian2003-01-07
|
* Enable IPv6 libpq 'hostaddr' addresses. Update docs.Bruce Momjian2003-01-06
|
* Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entriesBruce Momjian2003-01-06
| | | | | | | if the OS supports it. Code will still compile on non-IPv6-aware machines (feature added by Bruce). Nigel Kukard
* pgindent fe-connect.c --- done to make IPv6 patch easier to apply.Bruce Momjian2002-12-19
|
* Back out V6 code, caused postmaster startup failure.Bruce Momjian2002-12-06
|