libpgtcl cleanups for Tom Lane.

This commit is contained in:
Bruce Momjian 1998-09-04 05:03:05 +00:00
parent b806b3d3f8
commit e9d0fa3762
3 changed files with 13 additions and 12 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.33 1998/09/03 05:08:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.34 1998/09/04 05:02:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -616,8 +616,7 @@ Pg_result(ClientData cData, Tcl_Interp * interp, int argc, char *argv[])
for (i = 1; i < PQnfields(result); i++)
{
sprintf(workspace, "%s,%.200s%s", field0, PQfname(result,i),
appendstr);
sprintf(workspace, "%s,%.200s", field0, PQfname(result,i));
appendstr);
if (Tcl_SetVar2(interp, arrVar, workspace,
PQgetvalue(result, tupno, i),
TCL_LEAVE_ERR_MSG) == NULL)

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.66 1998/09/03 02:10:47 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.67 1998/09/04 05:03:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1489,12 +1489,15 @@ PQoidStatus(PGresult *res)
return "";
/*
* The cmdStatus string looks like INSERT oid count\0 In order to be
* able to return an ordinary C string without damaging the result for
* PQcmdStatus or PQcmdTuples, we copy the oid part of the string to
* just after the null, so that cmdStatus looks like INSERT oid
* count\0oid\0 ^ our return value points here Pretty klugy eh? This
* routine should've just returned an Oid value.
* The cmdStatus string looks like
* INSERT oid count\0
* In order to be able to return an ordinary C string without
* damaging the result for PQcmdStatus or PQcmdTuples, we copy
* the oid part of the string to just after the null, so that
* cmdStatus looks like
* INSERT oid count\0oid\0
* ^ our return value points here
* Pretty klugy eh? This routine should've just returned an Oid value.
*/
slen = strlen(res->cmdStatus);

View File

@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-fe.h,v 1.41 1998/09/03 02:10:51 momjian Exp $
* $Id: libpq-fe.h,v 1.42 1998/09/04 05:03:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -182,7 +182,6 @@ typedef void (*PQnoticeProcessor) (void * arg, const char * message);
extern ConnStatusType PQstatus(PGconn *conn);
extern char *PQerrorMessage(PGconn *conn);
extern int PQsocket(PGconn *conn);
extern int PQsocket(PGconn *conn);
extern int PQbackendPID(PGconn *conn);
/* Enable/disable tracing */