*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
}
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);
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);