github flightaware/Pgtcl v1.4
PgTcl 1.4

latest releases: v3.1.0, v3.0.1, v3.0.0...
8 years ago

With version 1.4, Pgtcl has been internally overhauled and brought up to date with the latest Tcl C-interface technology, while maintaining nearly 100% compatibility with the pg_* Tcl interface provided by Pgtcl 1.3.

Just about every Tcl program that uses Pgtcl 1.3 will work without modification under Pgtcl 1.4.

Version 1.4 was something of a transitional release, as pgtcl moved out the of core and into its this distribution. Previously, for example, the Pgtcl documentation resided with the rest of the PostgreSQL documentation, and Pgtcl's source code accessed PostgreSQL's include files and libraries in a fraternal manner that had to be divorced and reworked to use the same APIs and build methods that any external application would use to build against PostgreSQL's libpq C interface library.

The Pgtcl documentation is now included with this release. As building the documentation requires a number of fairly major tools and packages, the release also includes the docs prebuilt in HTML and PDF format.

CHANGES

The main changes are:

  • All commands have now been converted to use Tcl 8-style Tcl objects.

    The result is a probable increase in performance in all routines, with
    potentially huge performance increases in pg_select and pg_execute when
    used with complex Tcl code bodies.

  • Also Tcl 7 is no longer supported. (Surely you're not still
    using it, anyway, right?)

  • A new asynchronous interface has been added

    Requests can be issued to the backend without waiting for the
    results, allowing for user interfaces to still work while
    database requests are being processed, etc.
    Also, requests can now be cancelled while they're in progress.

  • pg_* call arguments are now checked much more rigorously.

    Code previously using atoi() for integer conversions now
    uses Tcl_GetIntFromObj, etc.

    pg_* calls with too many arguments were often accepted without
    complaint. These now generate standard Tcl "wrong # args"
    messages, etc.

    Error reporting has been brought into more compliance with the
    Tcl way of doing things.

  • TEA-compliant build and install.

  • pg_exec now supports $-variable substitution. This is a new
    feature of Postgres 7.4 that is now supported in Pgtcl.
    You can now say:

    pg_exec $conn {select * from foo where id = $1 and user = $2} $id $user

    And the values following the SQL statement are substituted positionally
    for $1, $2, etc, in the statement.

  • pg_exec_prepared allows execution of prepared SQL statements.

  • pg_sendquery_prepared allows asynchronous execution of prepared
    SQL statements.

Some programs that might have been working properly but had certain
syntatically incorrect pg_* commands will now fail until fixed.

pg_result -assign and pg_result -assignbyidx used to return the array
name, which was superfluous because the array name was specified on the
command line. They now return nothing. *** POTENTIAL INCOMPATIBILITY ***

Don't miss a new Pgtcl release

NewReleases is sending notifications on new releases.