Re: [HACKERS] libpgtcl and Tcl 8.0 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] libpgtcl and Tcl 8.0
Date
Msg-id 5549.904313106@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
Horak Daniel <horak@mmp.plzen-city.cz> writes:
> [I wrote]
>> Say, do you know whether the 6.3.2 Postgres release worked OK with
>> Tcl 8?  If so, it might just be that pgtclId.h needs to set
>> HAVE_TCL_GETFILEPROC to 0 for Tcl 8.
> I have tried this, but doesn't work. In current libpgtcl there are used
> functions Tcl_GetFile, Tcl_WatchFile, Tcl_FileReady. These aren't
> defined in Tcl 8.0 C interface.

Grumble.  So they redid the I/O interfaces (again).

This means that the current libpgtcl is broken under Tcl 8, which is not
good ... especially since 6.3.2's wasn't; it didn't use these functions,
because it didn't support asynchronous NOTIFY.

I will put this on my TODO list --- it won't get done before 1 Sept, but
hopefully this qualifies as a bug fix that I can sneak in before 6.4
release ;-)

As a short-term workaround you should be able to run under Tcl 8 by
doing the following:
  1. Fix pgtclId.h so that HAVE_TCL_GETFILEPROC is set to 0 for Tcl 8.
  2. In pgtclId.c, make Pg_Notify_SetupProc be an empty function
     (just delete all the contents);
  3. and in Pg_Notify_CheckProc, delete the calls to Tcl_GetFile and
     Tcl_FileReady (make the call to PQconsumeInput unconditional).

This should more or less work, except that Tcl won't notice an
asynchronous NOTIFY message until something else happens (like
a keystroke or mouse movement).

            regards, tom lane

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] vacuum problem
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] regression failures]