Skip to content

Commit 579f8f0

Browse files
Jan WieckJan Wieck
authored andcommitted
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
1 parent 230cf8d commit 579f8f0

File tree

3 files changed

+418
-3
lines changed

3 files changed

+418
-3
lines changed

src/interfaces/libpgtcl/pgtcl.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.17 2000/01/26 05:58:43 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.18 2000/11/27 13:29:32 wieck Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -70,6 +70,11 @@ Pgtcl_Init(Tcl_Interp *interp)
7070
Pg_result,
7171
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
7272

73+
Tcl_CreateCommand(interp,
74+
"pg_execute",
75+
Pg_execute,
76+
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
77+
7378
Tcl_CreateCommand(interp,
7479
"pg_lo_open",
7580
Pg_lo_open,
@@ -80,6 +85,17 @@ Pgtcl_Init(Tcl_Interp *interp)
8085
Pg_lo_close,
8186
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
8287

88+
#ifdef PGTCL_USE_TCLOBJ
89+
Tcl_CreateObjCommand(interp,
90+
"pg_lo_read",
91+
Pg_lo_read,
92+
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
93+
94+
Tcl_CreateObjCommand(interp,
95+
"pg_lo_write",
96+
Pg_lo_write,
97+
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
98+
#else
8399
Tcl_CreateCommand(interp,
84100
"pg_lo_read",
85101
Pg_lo_read,
@@ -89,6 +105,7 @@ Pgtcl_Init(Tcl_Interp *interp)
89105
"pg_lo_write",
90106
Pg_lo_write,
91107
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
108+
#endif
92109

93110
Tcl_CreateCommand(interp,
94111
"pg_lo_lseek",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy