Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4b048fb

Browse files
committed
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
1 parent b0297d8 commit 4b048fb

File tree

6 files changed

+284
-171
lines changed

6 files changed

+284
-171
lines changed

src/interfaces/libpgtcl/libpgtcl.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/*-------------------------------------------------------------------------
22
*
33
* libpgtcl.h--
4-
* libpgtcl is a tcl package for front-ends to interface with pglite
5-
* It's the tcl equivalent of the old libpq C interface.
4+
*
5+
* libpgtcl is a tcl package for front-ends to interface with PostgreSQL.
6+
* It's a Tcl wrapper for libpq.
67
*
78
* Copyright (c) 1994, Regents of the University of California
89
*
9-
* $Id: libpgtcl.h,v 1.5 1998/09/01 04:39:53 momjian Exp $
10+
* $Id: libpgtcl.h,v 1.6 1998/09/21 01:01:58 momjian Exp $
1011
*
1112
*-------------------------------------------------------------------------
1213
*/

src/interfaces/libpgtcl/pgtcl.c

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22
*
33
* pgtcl.c--
44
*
5-
* libpgtcl is a tcl package for front-ends to interface with pglite
6-
* It's the tcl equivalent of the old libpq C interface.
5+
* libpgtcl is a tcl package for front-ends to interface with PostgreSQL.
6+
* It's a Tcl wrapper for libpq.
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.12 1998/09/01 04:39:55 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtcl.c,v 1.13 1998/09/21 01:02:00 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616

1717
#include <stdlib.h>
1818

1919
#include "postgres.h"
20-
#include "tcl.h"
2120
#include "libpgtcl.h"
2221
#include "pgtclCmds.h"
2322
#include "pgtclId.h"
2423

2524
/*
2625
* Pgtcl_Init
27-
* initialization package for the PGLITE Tcl package
26+
* initialization package for the PGTCL Tcl package
2827
*
2928
*/
3029

@@ -35,7 +34,7 @@ Pgtcl_Init(Tcl_Interp * interp)
3534
/*
3635
* finish off the ChannelType struct. Much easier to do it here then
3736
* to guess where it might be by position in the struct. This is
38-
* needed for Tcl7.6 and beyond, which have the getfileproc.
37+
* needed for Tcl7.6 *only*, which has the getfileproc.
3938
*/
4039
#if HAVE_TCL_GETFILEPROC
4140
Pg_ConnType.getFileProc = PgGetFileProc;
@@ -127,7 +126,7 @@ Pgtcl_Init(Tcl_Interp * interp)
127126
Pg_listen,
128127
(ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
129128

130-
Tcl_PkgProvide(interp, "Pgtcl", "1.2");
129+
Tcl_PkgProvide(interp, "Pgtcl", "1.3");
131130

132131
return TCL_OK;
133132
}

0 commit comments

Comments
 (0)