Jason C. Wells wrote:
>
> Where would you advise a TCL noob to start when considering TCL interfaces
> for postgresql?
>
> I am pretty sure that pgin.tcl is the way I will go, but I lack the
> confidence owing to my noobness. If someone would pat me on the head and
> tell me, "You can't go wrong with pgin.tcl" I would be much obliged.
Sorry, I won't tell you "You can't go wrong with pgin.tcl", and I'm the
one who wrote it...
> I have had trouble with libpgtcl because of the availability of windows
> libraries. I tried pgin.tcl and it "just worked" and that groovy to me.
>
> Perhaps libpq.dll and libpgtcl.dll are available and current somewhere
> that I have not noticed. The only place I found them was in the pgaccess
> distribution which seems to be getting stale. Any pointers to binary
> windows DLLs?
No, you are right, I don't think they are available, but stay tuned to
this list regarding libpgtcl and Windows.
> I could always fall back on PHP, but I kind of want to venture into TCL
> and this seems like a great way to get started.
Here's my advice. If you are serving web pages from PostgreSQL data, and
aren't committed to Tcl for some reason, and are on a platform where you
can get or build the PostgreSQL PHP interface: no contest, go with PHP.
As much as I like Tcl, PHP is a much better language for serving web pages,
and the PostgreSQL PHP module is really solid.
If you are going to use Tcl: On non-Windows platforms, use the bundled
libpgtcl included with PostgreSQL. On Windows platforms, use pgin.tcl.
Either way, stick with the core commands (no asynchronous, do not use COPY
FROM/COPY TO). Now your Tcl code is compatible with the bundled libpgtcl,
and with pgin.tcl 1.x (talks to PostgreSQL 7.3 servers, and 7.4 in
down-level protocol mode). In the (hopefully) very near future, your code
will also be compatible with pgin.tcl 2.x (currently beta, talks to
PostgreSQL 7.4 servers only, with the latest protocol). And in the
(hopefully) not so distant future, it will be compatible with a new
unbundled libpgtcl, which will also be available as Borland-compiled DLLs
for Windows.