mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
This patch covers several to-do items that I had for libpgtcl:
* It works under both Tcl 7.6 and Tcl 8.0 now. (The code claims to work under Tcl 7.5 as well, but I have no way to test that --- if anyone still cares, please check it with 7.5.) * pg_listen suppresses extra LISTEN commands and correctly sends an UNLISTEN when the last listen request for a relation is cancelled. (Note this means it will not work with pre-6.4 backends, but that was true already because it depends on the current libpq, which only speaks protocol 2.0.) * Added -error option to pg_result so that there's some way to find out what you did wrong ;-) * Miscellaneous cleanups of code comments and overenthusiastic #includes. BTW, I bumped the package version number from 1.2 to 1.3. Is this premature? Does someone run around and do that routinely before each pgsql release? regards, tom lane
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* pgtclId.h--
|
||||
* useful routines to convert between strings and pointers
|
||||
* Needed because everything in tcl is a string, but often, pointers
|
||||
* to data structures are needed.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pgtclId.h,v 1.8 1998/09/01 04:39:59 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
*
|
||||
* pgtclId.h--
|
||||
*
|
||||
* Contains Tcl "channel" interface routines, plus useful routines
|
||||
* to convert between strings and pointers. These are needed because
|
||||
* everything in Tcl is a string, but in C, pointers to data structures
|
||||
* are needed.
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: pgtclId.h,v 1.9 1998/09/21 01:02:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern void PgSetConnectionId(Tcl_Interp * interp, PGconn *conn);
|
||||
|
||||
@@ -32,8 +33,8 @@ extern void PgSetConnectionId(Tcl_Interp * interp, PGconn *conn);
|
||||
#define DRIVER_DEL_PROTO ClientData cData, Tcl_Interp *interp
|
||||
#endif
|
||||
|
||||
extern PGconn *PgGetConnectionId(Tcl_Interp * interp, char *id, \
|
||||
Pg_ConnectionId **);
|
||||
extern PGconn *PgGetConnectionId(Tcl_Interp * interp, char *id,
|
||||
Pg_ConnectionId **);
|
||||
extern PgDelConnectionId(DRIVER_DEL_PROTO);
|
||||
extern int PgOutputProc(DRIVER_OUTPUT_PROTO);
|
||||
extern PgInputProc(DRIVER_INPUT_PROTO);
|
||||
@@ -46,8 +47,8 @@ extern void PgStopNotifyEventSource(Pg_ConnectionId * connid);
|
||||
extern void PgNotifyTransferEvents(Pg_ConnectionId * connid);
|
||||
extern void PgNotifyInterpDelete(ClientData clientData, Tcl_Interp * interp);
|
||||
|
||||
/* GetFileProc is needed in Tcl 7.6 and later */
|
||||
#if (TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 706
|
||||
/* GetFileProc is needed in Tcl 7.6 *only* ... it went away again in 8.0 */
|
||||
#if TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 6
|
||||
#define HAVE_TCL_GETFILEPROC 1
|
||||
#else
|
||||
#define HAVE_TCL_GETFILEPROC 0
|
||||
@@ -55,7 +56,6 @@ extern void PgNotifyInterpDelete(ClientData clientData, Tcl_Interp * interp);
|
||||
|
||||
#if HAVE_TCL_GETFILEPROC
|
||||
extern Tcl_File PgGetFileProc(ClientData cData, int direction);
|
||||
|
||||
#endif
|
||||
|
||||
extern Tcl_ChannelType Pg_ConnType;
|
||||
|
||||
Reference in New Issue
Block a user