diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-03-30 17:39:16 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-03-30 17:39:16 +0000 |
commit | dbf34c5c19f8f5ebfd0a27e5d83ffad57b283b9e (patch) | |
tree | ce3e91e0eba0e3d15b63c16dc109009277d5031c | |
parent | 57b5966405fb6e237676acef55973c064ac65a2a (diff) | |
download | postgresql-dbf34c5c19f8f5ebfd0a27e5d83ffad57b283b9e.tar.gz postgresql-dbf34c5c19f8f5ebfd0a27e5d83ffad57b283b9e.zip |
This problem had nothing to do with the upgrades I made. There
was a 2000 character buffer allocated for results, and the files
you refer to produce a 2765 byte column called formsource. This
should not have worked with any version of libpgtcl.
Nevertheless, the limit is an artificial one, since there is no
need to use this intermediate buffer where it is being used and
abused.
Randy Kunkee <kunkee@pluto.ops.NeoSoft.com>
-rw-r--r-- | src/interfaces/libpgtcl/pgtclCmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index c68c842fedc..0d80434edbd 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.22 1998/03/15 08:02:58 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.23 1998/03/30 17:39:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1226,6 +1226,7 @@ Pg_select(ClientData cData, Tcl_Interp *interp, int argc, char **argv) } Tcl_SetVar2(interp, argv[3], ".headers", Tcl_DStringValue(&headers), 0); + Tcl_DStringFree(&headers); sprintf(buffer, "%d", ncols); Tcl_SetVar2(interp, argv[3], ".numcols", buffer, 0); @@ -1236,8 +1237,7 @@ Pg_select(ClientData cData, Tcl_Interp *interp, int argc, char **argv) for (column = 0; column < ncols; column++) { - strcpy(buffer, PQgetvalue(result, tupno, column)); - Tcl_SetVar2(interp, argv[3], info[column].cname, buffer, 0); + Tcl_SetVar2(interp, argv[3], info[column].cname, PQgetvalue(result, tupno, column), 0); } Tcl_SetVar2(interp, argv[3], ".command", "update", 0); |