mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
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
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pgtclCmds.h,v 1.18 2000/05/29 21:25:03 momjian Exp $
|
||||
* $Id: pgtclCmds.h,v 1.19 2000/11/27 13:29:32 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,6 +20,15 @@
|
||||
#define RES_HARD_MAX 128
|
||||
#define RES_START 16
|
||||
|
||||
/*
|
||||
* From Tcl verion 8.0 on we can make large object access binary.
|
||||
*/
|
||||
#ifdef TCL_MAJOR_VERSION
|
||||
# if (TCL_MAJOR_VERSION >= 8)
|
||||
# define PGTCL_USE_TCLOBJ
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Each Pg_ConnectionId has a list of Pg_TclNotifies structs, one for each
|
||||
* Tcl interpreter that has executed any pg_listens on the connection.
|
||||
@@ -75,6 +84,8 @@ extern int Pg_disconnect(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_exec(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_execute(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_select(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_result(
|
||||
@@ -83,10 +94,19 @@ extern int Pg_lo_open(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_lo_close(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
#ifdef PGTCL_USE_TCLOBJ
|
||||
extern int Pg_lo_read(
|
||||
ClientData cData, Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[]);
|
||||
extern int Pg_lo_write(
|
||||
ClientData cData, Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *CONST objv[]);
|
||||
#else
|
||||
extern int Pg_lo_read(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_lo_write(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
#endif
|
||||
extern int Pg_lo_lseek(
|
||||
ClientData cData, Tcl_Interp *interp, int argc, char *argv[]);
|
||||
extern int Pg_lo_creat(
|
||||
|
Reference in New Issue
Block a user