aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpgtcl/pgtclCmds.c
Commit message (Collapse)AuthorAge
* Restore compatibility with Tcl 8.0.* --- from ljb.Tom Lane2003-11-08
|
* Use Tcl ByteArray objects to avoid unwanted character set translationTom Lane2003-10-31
| | | | | in libpgtcl's lo_read/lo_write commands. Also, deal correctly with failure return from lo_read(). ljb and Tom Lane.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Adjust Tcl-related code to compile cleanly with Tcl 8.4 (add const modifiers asTom Lane2002-12-30
| | | | needed). Some desultory const-ification of SPI interface to support this.
* Add -cmdTuples to tcl interface.Bruce Momjian2002-11-26
|
* Improve formatting of error message.Tom Lane2002-10-17
|
* pgindent run.Bruce Momjian2002-09-04
|
* Partial solution for 'unexpected EOF' problem with pg_disconnect: itTom Lane2002-09-02
| | | | | | | seems we have a choice between annoying messages and leaking memory (or dumping core, but that's right out). Patch also fixes several other problems in pg_disconnect, such as being willing to close a channel that isn't a PG channel.
* pg_on_connection_loss command for libpgtcl. Patch fromTom Lane2002-09-02
| | | | | | | | Gerhard Hintermayer, revised and documented by Tom Lane. This patch also fixes a 'must fix' bug: libpgtcl's LISTEN/NOTIFY support was broken by the recent changes to the PGnotify structure. Guess that change wasn't quite so safe as we thought.
* I checked all the previous string handling errors and most of them wereBruce Momjian2002-09-02
| | | | | | | | | | | | | | | already fixed by You. However there were a few left and attached patch should fix the rest of them. I used StringInfo only in 2 places and both of them are inside debug ifdefs. Only performance penalty will come from using strlen() like all the other code does. I also modified some of the already patched parts by changing snprintf(buf, 2 * BUFSIZE, ... style lines to snprintf(buf, sizeof(buf), ... where buf is an array. Jukka Holappa
* Back out tcl patch, per Tom Lane:Bruce Momjian2002-08-18
| | | | | | Everytime if I do PQconsumeInput (when the backend channel gets readable) I check for the return value. (0 == error) and generate a notification manually, e.g. fixed string connection_closed) and pass it to the
* What I have done for libpgtcl:Bruce Momjian2002-08-17
| | | | | | | | | | | | | | | | | | | | | | Everytime if I do PQconsumeInput (when the backend channel gets readable) I check for the return value. (0 == error) and generate a notification manually, e.g. fixed string connection_closed) and pass it to the TCL event queue. The only other thing I had to do is to comment out removing all pending events in PgStopNotifyEventSource whenever the connection was unexpectedly closed (so the manually generated event will not be deleted). A broken backend connection triggers a notify event to the client (fixed notification string "connection_closed") so proper action can be taken to switch to another database server etc. Remember that this is event driven. If you have applications, that have idle database connections most of the time, you'll get immediate feedback of a dying server. Upon connection to the server issue a pg_notify for notify event "connection_closed" and whenever the backend crashes (which it does do in very very rare cases) you get an event driven recovery. (of course the Tcl-Event loop has to be processed). Issuing a notification "connection_closed" on a still working database could be used for switching to another db-server (which I've actually impelemented right now). Gerhard Hintermayer
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Fix bogus error check in pg_execute, per report from lbayuk@mindspring.com.Tom Lane2002-03-04
|
* Pg_lo_open must OR together multiple modes, not AND them. Per reportTom Lane2001-12-03
| | | | from Andreas Kretzer.
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-05
| | | | initdb/regression tests pass.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Below is the patch against current cvs for libpgtcl andBruce Momjian2001-09-06
| | | | | | | | | two additional files win32.mak and libpgtcl.def. This patch allows to compile libpgtcl.dll on Windows with tcl > 8.0. I've tested it on WinNT (VC6.0), SUSE Linux (7.0) and Solaris 2.6 with tcl 8.3.3. Mikhail Terekhov
* Since PQoidStatus is deprecated, we should probably stop using it inTom Lane2001-08-10
| | | | our own code ...
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Restructure the key include files per recent pghackers discussion: thereTom Lane2001-02-10
| | | | | | | | | | | are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-24
|
* column and tuple numbers should be int not size_t.Tom Lane2000-12-29
|
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-03
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* Added pg_execute command behaving like spi_exec of PL/TclJan Wieck2000-11-27
| | | | | | | | Made pg_lo_read and pg_lo_write binary data safe when libpgtcl is compiled against Tcl version 8.0 or higher. Jan
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-12
|
* Change PQconndefaults() to return a malloc'd array, instead of a staticTom Lane2000-03-11
| | | | | | | | array. This allows processing of conninfo strings to be made thread-safe, at the cost of a small memory leak in applications that use PQconndefaults() and are not updated to free the returned array via the new PQconninfoFree() function. But PQconndefaults() is probably not used very much, so this seems like a good compromise.
* Clean up badly-formatted error messages from pg_connect.Tom Lane2000-02-27
|
* Add:Bruce Momjian2000-01-26
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Another pgindent run. Sorry folks.Bruce Momjian1999-05-25
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-10
| | | | real affect now.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Add PQresStatus() function to avoid direct access to pgresStatus[] array,Tom Lane1999-02-07
| | | | making life easier for Windoids...
* TCL_ARRAYS option patches from Massimo Dal ZottoTom Lane1999-01-17
|
* Fix another memory leak in pg_select --- pointed out by teo@flex.roTom Lane1998-10-14
|
* Fix potential coredump in pg_conndefaults (assigning constant stringTom Lane1998-10-02
| | | | | to a field that will get free'd). Also make it robust in cases where values contain Tcl special characters.
* Simplify pg_result by using new libpq PQresultErrorMessage;Tom Lane1998-10-01
| | | | fix some memory leaks in pg_select.
* This patch covers several to-do items that I had for libpgtcl:Bruce Momjian1998-09-21
| | | | | | | | | | | | | | | | | | | | | | | * It works under both Tcl 7.6 and Tcl 8.0 now. (The code claims to work under Tcl 7.5 as well, but I have no way to test that --- if anyone still cares, please check it with 7.5.) * pg_listen suppresses extra LISTEN commands and correctly sends an UNLISTEN when the last listen request for a relation is cancelled. (Note this means it will not work with pre-6.4 backends, but that was true already because it depends on the current libpq, which only speaks protocol 2.0.) * Added -error option to pg_result so that there's some way to find out what you did wrong ;-) * Miscellaneous cleanups of code comments and overenthusiastic #includes. BTW, I bumped the package version number from 1.2 to 1.3. Is this premature? Does someone run around and do that routinely before each pgsql release? regards, tom lane
* libpgtcl cleanups for Tom Lane.Bruce Momjian1998-09-04
|
* patch cleanups.Bruce Momjian1998-09-03
|
* Attached is a patch to remove the definitions of libpq's internalBruce Momjian1998-09-03
| | | | | | | | | | | | | | | | | structs from libpq-fe.h, as we previously discussed. There turned out to be sloppy coding practices in more places than I had realized :-(, but all in all I think it was a well-worth-while exercise. I ended up adding several routines to libpq's API in order to respond to application requirements that were exposed by this work. I owe the docs crew updates for libpq.sgml to describe these changes. I'm way too tired to work on the docs tonight, however. This is the last major change I intend to submit for 6.4. I do want to see if I can make libpgtcl work with Tcl 8.0 before we go final, but hopefully that will be a minor bug fix.
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* Date: Sun, 16 Aug 1998 14:56:48 -0400Marc G. Fournier1998-08-17
| | | | | | | | From: Tom Lane <tgl@sss.pgh.pa.us> Attached is a patch for this weekend's work on libpq. I've dealt with several issues: <for details: see message, in pgsql-patches archive for above data>
* From: Tom Lane <tgl@sss.pgh.pa.us>Marc G. Fournier1998-07-09
| | | | | | | | | | | | | | | | | | | | | | | | The attached patches respond to discussion that was on pgsql-hackers around the beginning of June (see thread "libpgtcl bug (and symptomatic treatment)"). The changes are: 1. Remove code in connectDB that throws away the password after making a connection. This doesn't really add much security IMHO --- a bad guy with access to your client's address space can likely extract the password anyway, to say nothing of what he might do directly. And there's the serious shortcoming that it prevents PQreset() from working if the database requires a password. 2. Fix coredump problem: fe_sendauth did not guard against being handed a NULL password pointer. (This is the proximate cause of the coredump- during-PQreset problem that Magosanyi Arpad complained of last month.) 3. Remove highly questionable "error recovery" logic in libpgtcl's pg_exec statement. I believe the consensus of the discussion last month was in favor of #1 and #3, but I'm just now getting around to making the change. I realized that #2 was a bug in process of looking at the change.
* large object fixBruce Momjian1998-06-16
|
* There is a patch which has worked for me. The real problem mightBruce Momjian1998-06-16
| | | | | | | be in PQreset, which can't reset a conninfo based connection. The patch: Arpad Magosanyi