Preface

This book documents Pgtcl, a Tcl package for client programs to interface with PostgreSQL database servers. It makes most of the functionality of libpq available to Tcl scripts.

This manual describes the implementation of Pgtcl called pgtcl-ng ("next generation"). pgtcl-ng implements the interface as a loadable library called libpgtcl, which can be directly loaded into a Tcl interpreter or via the Tcl package mechanism. This implementation is available at http://sourceforge.net/projects/pgtclng/ [1]. Pgtcl-ng implements all of the commands and functions described in this manual. The current version of pgtcl-ng is 2.1.1. Notations in this manual indicate features added to pgtcl-ng after version 1.5.0.

Another implementation of Pgtcl is the pure-Tcl version called pgintcl. pgintcl implements the interface as a script file pgin.tcl which can be sourced into a Tcl interpreter or loaded via the Tcl package mechanism. Pgintcl supports most of the commands and functions described in this manual. It does not support asynchronous query processing commands in Section 4.4, “Asynchronous Query Processing Commands” nor the pg_on_connection_loss function. Also, Pgintcl implements bulk COPY differently, so the examples in Section 5.13, “Example - COPY FROM and COPY TO” do not apply. Since it is written entirely in Tcl, pgintcl can be significantly slower than pgtcl-ng, but can be used on any platform where Tcl is available, without compilation. Pgintcl is available at http://sourceforge.net/projects/pgintcl/ [2]. The current version of pgintcl is 3.5.0. Notations in this manual indicate features added to pgintcl after version 2.0.0.

There are two other implementations of Pgtcl. The version bundled with PostgreSQL through version 7.4.x provided a compatible subset of the commands and functions documented in this manual, but is now obsolete. The project hosted at http://flightaware.github.com/Pgtcl/ provides many of the same commands and functions as documented in this manual, but there are extensions and incompatibilities. Consult the respective documentation for these implementations for more information.



[1] Until March 2011, the pgtcl-ng project was hosted at http://pgfoundry.org/projects/pgtclng/

[2] Until March 2011, the pgintcl project was hosted at http://pgfoundry.org/projects/pgintcl/

SourceForge.net Logo

This version of the manual was produced for the Pgtcl-ng Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the Pgtcl-ng project downloads area.