1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

The attached patch modifies libpgtcl per previous discussion: the

pg_notifies statement is eliminated, and callbacks defined by
pg_listen are instead invoked automatically from the Tcl idle loop
whenever a NOTIFY message is received.

I have done only cursory testing, so there may be problems still
lurking (particularly on non-Unix machines?).  But it seems to
work.

Patch is against today's cvs sources.  Note that this will not work
with the 6.3.2 release since it depends on the new libpq.

The diffs are a bit large so I've gzipped them.  A patch to update
libpgtcl.sgml is included too.

			regards, tom lane
This commit is contained in:
Bruce Momjian
1998-06-16 04:10:17 +00:00
parent 693b156a70
commit 583891833f
6 changed files with 551 additions and 174 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.10 1998/03/15 08:02:57 scrappy Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.11 1998/06/16 04:10:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@ Pgtcl_Init (Tcl_Interp *interp)
* to guess where it might be by position in the struct. This is needed
* for Tcl7.6 and beyond, which have the getfileproc.
*/
#if (TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION == 6)
#if HAVE_TCL_GETFILEPROC
Pg_ConnType.getFileProc = PgGetFileProc;
#endif
@@ -126,12 +126,7 @@ Pgtcl_Init (Tcl_Interp *interp)
Pg_listen,
(ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateCommand(interp,
"pg_notifies",
Pg_notifies,
(ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_PkgProvide(interp, "Pgtcl", "1.1");
Tcl_PkgProvide(interp, "Pgtcl", "1.2");
return TCL_OK;
}