postgresql/src/interfaces/libpgtcl
Marc G. Fournier 6d817475b2 From: Tom Lane <tgl@sss.pgh.pa.us>
HP-UX (all versions) requires shared libraries to have execute
permission, and really needs them to be exactly mode 555 for
performance reasons.  The standard configure/install procedure
installs libpq.sl as mode 644, which DOES NOT WORK.

The attached patch modifies the makefiles to distinguish
INSTL_LIB_OPTS (install mode for ordinary libraries) from
INSTL_SHLIB_OPTS (mode for shared libs), and adds a test
to configure to set INSTL_SHLIB_OPTS="-m 555" when on HP-UX.
1998-04-27 14:55:46 +00:00
..
Makefile.in From: Tom Lane <tgl@sss.pgh.pa.us> 1998-04-27 14:55:46 +00:00
README From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-03-15 08:03:00 +00:00
libpgtcl.h Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
pgtcl.c From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-03-15 08:03:00 +00:00
pgtclCmds.c This problem had nothing to do with the upgrades I made. There 1998-03-30 17:39:16 +00:00
pgtclCmds.h From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-03-15 08:03:00 +00:00
pgtclId.c From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-03-15 08:03:00 +00:00
pgtclId.h From: Randy Kunkee <kunkee@pluto.ops.NeoSoft.com> 1998-03-15 08:03:00 +00:00

README

libpgtcl is a library that implements Tcl commands for front-end
clients to interact with the Postgresql 6.3 (and perhaps later)
backends.  See libpgtcl.doc for details.
  
For an example of how to build a new tclsh to use libpgtcl, see the
directory ../bin/pgtclsh

Note this version is modified by NeoSoft to have the following additional
features:

1. Postgres connections are a valid Tcl channel, and can therefore
   be manipulated by the interp command (ie. shared or transfered).
   A connection handle's results are transfered/shared with it.
   (Result handles are NOT channels, though it was tempting).  Note
   that a "close $connection" is now functionally identical to a
   "pg_disconnect $connection", although pg_connect must be used
   to create a connection.
   
2. Result handles are changed in format: ${connection}.<result#>.
   This just means for a connection 'pgtcl0', they look like pgtcl0.0,
   pgtcl0.1, etc.  Enforcing this syntax makes it easy to look up
   the real pointer by indexing into an array associated with the
   connection.

3. I/O routines are now defined for the connection handle.  I/O to/from
   the connection is only valid under certain circumstances: following
   the execution of the queries "copy <table> from stdin" or
   "copy <table> to stdout".  In these cases, the result handle obtains
   an intermediate status of "PGRES_COPY_IN" or "PGRES_COPY_OUT".  The
   programmer is then expected to use Tcl gets or read commands on the
   database connection (not the result handle) to extract the copy data.
   For copy outs, read until the standard EOF indication is encountered.
   For copy ins, puts a single terminator (\.).  The statement for this
   would be
	puts $conn "\\."      or       puts $conn {\.}
   In either case (upon detecting the EOF or putting the `\.', the status
   of the result handle will change to "PGRES_COMMAND_OK", and any further
   I/O attempts will cause a Tcl error.