summaryrefslogtreecommitdiff
path: root/src/interfaces/libpgtcl/pgtcl.c
diff options
context:
space:
mode:
authorJan Wieck <JanWieck@Yahoo.com>2000-11-27 13:29:32 +0000
committerJan Wieck <JanWieck@Yahoo.com>2000-11-27 13:29:32 +0000
commit579f8f09faee5b30f5c8e0b98c5c8e43719769a3 (patch)
tree8e7daaa5a7fe702463fbc5a2b978c018482cac6c /src/interfaces/libpgtcl/pgtcl.c
parent230cf8d37363e63ad97436b7b47fcf122b6afc6b (diff)
Added pg_execute command behaving like spi_exec of PL/Tcl
Made pg_lo_read and pg_lo_write binary data safe when libpgtcl is compiled against Tcl version 8.0 or higher. Jan
Diffstat (limited to 'src/interfaces/libpgtcl/pgtcl.c')
-rw-r--r--src/interfaces/libpgtcl/pgtcl.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/interfaces/libpgtcl/pgtcl.c b/src/interfaces/libpgtcl/pgtcl.c
index e7e37ce46b4..a7e3d852d41 100644
--- a/src/interfaces/libpgtcl/pgtcl.c
+++ b/src/interfaces/libpgtcl/pgtcl.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.17 2000/01/26 05:58:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.18 2000/11/27 13:29:32 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,6 +71,11 @@ Pgtcl_Init(Tcl_Interp *interp)
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
Tcl_CreateCommand(interp,
+ "pg_execute",
+ Pg_execute,
+ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+
+ Tcl_CreateCommand(interp,
"pg_lo_open",
Pg_lo_open,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
@@ -80,6 +85,17 @@ Pgtcl_Init(Tcl_Interp *interp)
Pg_lo_close,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+#ifdef PGTCL_USE_TCLOBJ
+ Tcl_CreateObjCommand(interp,
+ "pg_lo_read",
+ Pg_lo_read,
+ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+
+ Tcl_CreateObjCommand(interp,
+ "pg_lo_write",
+ Pg_lo_write,
+ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+#else
Tcl_CreateCommand(interp,
"pg_lo_read",
Pg_lo_read,
@@ -89,6 +105,7 @@ Pgtcl_Init(Tcl_Interp *interp)
"pg_lo_write",
Pg_lo_write,
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+#endif
Tcl_CreateCommand(interp,
"pg_lo_lseek",