pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
libpgtcl and WinNT
4+ messages / 3 participants
[nested] [flat]

* libpgtcl and WinNT
@ 2001-05-01 08:32 Ludek Finstrle <xfinstrl@informatics.muni.cz>
  2001-05-02 04:57 ` Re: libpgtcl and WinNT Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Ludek Finstrle @ 2001-05-01 08:32 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,

  I have compilation problem with libpgtcl from postgresql 7.1 on WinNT.
The problem was that Tcl/Tk under WinNT doesn't support Tcl_CreateFileHandler
and Tcl_DeleteFileHandler functions. Make I something wrong?
I disabling part of code with this and compile libpgtcl. I have
no problems with using libpgtcl and pgaccess but I'm not sure that
my solution is right.

Have someone experience with it?

Luf



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpgtcl and WinNT
  2001-05-01 08:32 libpgtcl and WinNT Ludek Finstrle <xfinstrl@informatics.muni.cz>
@ 2001-05-02 04:57 ` Tom Lane <tgl@sss.pgh.pa.us>
  2001-05-09 01:00   ` Re: libpgtcl and WinNT Edward Grabczewski <xye85@dial.pipex.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2001-05-02 04:57 UTC (permalink / raw)
  To: Ludek Finstrle <xfinstrl@informatics.muni.cz>; +Cc: pgsql-interfaces

Ludek Finstrle <xfinstrl@informatics.muni.cz> writes:
>   I have compilation problem with libpgtcl from postgresql 7.1 on WinNT.
> The problem was that Tcl/Tk under WinNT doesn't support Tcl_CreateFileHandler
> and Tcl_DeleteFileHandler functions.

Yup.  This is not new in 7.1, it's been like that since Tcl 8.0 came
out.

In their infinite(?) wisdom, the Tcl boys removed all cross-platform
support for waiting for socket input in Tcl 8.0.  Presently libpgtcl
depends on Tcl_CreateFileHandler which is a Unix-only API.  Feel free
to contribute code to implement a Windows-compatible solution (maybe
even a Mac-compatible-too solution, like we used to have pre-Tcl-8).
Or rattle the cage over in Tcl land till they get some sense knocked
back into them.  Or something.  But right now it's busted.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: libpgtcl and WinNT
  2001-05-01 08:32 libpgtcl and WinNT Ludek Finstrle <xfinstrl@informatics.muni.cz>
  2001-05-02 04:57 ` Re: libpgtcl and WinNT Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-05-09 01:00   ` Edward Grabczewski <xye85@dial.pipex.com>
  2001-05-12 17:53     ` Re: Re: libpgtcl and WinNT Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Edward Grabczewski @ 2001-05-09 01:00 UTC (permalink / raw)
  To: pgsql-interfaces

I've just had an interesting reply from Kevin Kenny re the broken library
which Tom Lane commented on recently. I'm not experienced enought in TK/TCL
API programming yet to understand the answer fully but could someone comment
on the possibility of parching up the libarary based on this comment?

------------------------------------------------------
Edward Grabczewski wrote:
> Does anyone know why TCL 8 stopped supporiting the Tcl_CreateFileHandler
and
> Tcl_DeleteFileHandler functions which were in Tcl 7? Unfortunately, the
> Windows version of the PostgreSQL Tcl library - pgtcl.lib - requires these
> two functions and it's not possible to compile these libraries any more.

The functions themselves were not portable to non-Unix platforms.  The
capability of establishing callbacks on a file is still available; the
functions are named Tcl_CreateChannelHandler and Tcl_DeleteChannelHandler.

In the usual case, old code that used Tcl_CreateFileHandler and
Tcl_DeleteFileHandler was waiting for I/O on a socket.  The way to port
this forward is to wrap a Tcl_Channel around the socket by calling
Tcl_MakeTcpClientChannel.  The function name is a bit of a misnomer, since
it works just fine for sockets that use other protocols.  You don't
need to use channel-based I/O; it's fine to do 'recvfrom', 'read',
'send', 'write', or whatever in the channel handler as long as you
don't mix it with Tcl_Read, etc.

Also, I've heard that libtclpq does somewhat better on modern Tcl releases.
There are pointers to it on
    http://tcl.activestate.com/software/tclhttpd/technotes.html
and http://tcl.activestate.com:8002/resource/software/extensions/database/

but both of them are pointing to hosts that my DNS won't resolve at the
moment, probably because of electrical outages elsewhere on the Internet.

The links are:
    http://field.medicine.adelaide.edu.au/~colin/libtclpq/
and ftp://coldstore.sourceforge.net/pub/coldstore/libtclpq-20010120.tgz

in case you have better luck than I.
--
73 de ke9tv/2, Kevin KENNY GE Corporate R&D, Niskayuna, New York, USA
------------------------------------------------------

--
Eddy Grabczewski
eddy@polonia.co.uk



"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:10073.988779464@sss.pgh.pa.us...
> Ludek Finstrle <xfinstrl@informatics.muni.cz> writes:
> >   I have compilation problem with libpgtcl from postgresql 7.1 on WinNT.
> > The problem was that Tcl/Tk under WinNT doesn't support
Tcl_CreateFileHandler
> > and Tcl_DeleteFileHandler functions.
>
> Yup.  This is not new in 7.1, it's been like that since Tcl 8.0 came
> out.
>
> In their infinite(?) wisdom, the Tcl boys removed all cross-platform
> support for waiting for socket input in Tcl 8.0.  Presently libpgtcl
> depends on Tcl_CreateFileHandler which is a Unix-only API.  Feel free
> to contribute code to implement a Windows-compatible solution (maybe
> even a Mac-compatible-too solution, like we used to have pre-Tcl-8).
> Or rattle the cage over in Tcl land till they get some sense knocked
> back into them.  Or something.  But right now it's busted.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Re: libpgtcl and WinNT
  2001-05-01 08:32 libpgtcl and WinNT Ludek Finstrle <xfinstrl@informatics.muni.cz>
  2001-05-02 04:57 ` Re: libpgtcl and WinNT Tom Lane <tgl@sss.pgh.pa.us>
  2001-05-09 01:00   ` Re: libpgtcl and WinNT Edward Grabczewski <xye85@dial.pipex.com>
@ 2001-05-12 17:53     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2001-05-12 17:53 UTC (permalink / raw)
  To: Edward Grabczewski <xye85@dial.pipex.com>; +Cc: pgsql-interfaces

"Edward Grabczewski" <xye85@dial.pipex.com> writes:
> I've just had an interesting reply from Kevin Kenny re the broken library
> which Tom Lane commented on recently. I'm not experienced enought in TK/TCL
> API programming yet to understand the answer fully but could someone comment
> on the possibility of parching up the libarary based on this comment?

This sounds like there is a new cross-platform interface that could
substitute for the old Tcl 7.* approach.  It might be kinda painful to
support both new and old via conditional compilation (so that we don't
break support for Tcl 7.*), but in principle it could be done.  Does
anyone have time to work on libpgtcl?  If you can write C it shouldn't
be too hard to fix it.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2001-05-12 17:53 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-01 08:32 libpgtcl and WinNT Ludek Finstrle <xfinstrl@informatics.muni.cz>
2001-05-02 04:57 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-09 01:00   ` Edward Grabczewski <xye85@dial.pipex.com>
2001-05-12 17:53     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox