aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpgtcl/pgtcl.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-06-16 04:10:17 +0000
committerBruce Momjian <bruce@momjian.us>1998-06-16 04:10:17 +0000
commit583891833ff102b805a752ded0ad38bb8087dcf9 (patch)
tree9dbeb199ed4cf0c73edb100837977fce3bb9ab86 /src/interfaces/libpgtcl/pgtcl.c
parent693b156a7003d774752095585df0c609c3dce9d9 (diff)
downloadpostgresql-583891833ff102b805a752ded0ad38bb8087dcf9.tar.gz
postgresql-583891833ff102b805a752ded0ad38bb8087dcf9.zip
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
Diffstat (limited to 'src/interfaces/libpgtcl/pgtcl.c')
-rw-r--r--src/interfaces/libpgtcl/pgtcl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/interfaces/libpgtcl/pgtcl.c b/src/interfaces/libpgtcl/pgtcl.c
index a90c0c7c490..af6f4d74af7 100644
--- a/src/interfaces/libpgtcl/pgtcl.c
+++ b/src/interfaces/libpgtcl/pgtcl.c
@@ -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;
}