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

Commit e9d0fa3

Browse files
committed
libpgtcl cleanups for Tom Lane.
1 parent b806b3d commit e9d0fa3

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

src/interfaces/libpgtcl/pgtclCmds.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.33 1998/09/03 05:08:28 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.34 1998/09/04 05:02:58 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -616,8 +616,7 @@ Pg_result(ClientData cData, Tcl_Interp * interp, int argc, char *argv[])
616616
for (i = 1; i < PQnfields(result); i++)
617617
{
618618
sprintf(workspace, "%s,%.200s%s", field0, PQfname(result,i),
619-
appendstr);
620-
sprintf(workspace, "%s,%.200s", field0, PQfname(result,i));
619+
appendstr);
621620
if (Tcl_SetVar2(interp, arrVar, workspace,
622621
PQgetvalue(result, tupno, i),
623622
TCL_LEAVE_ERR_MSG) == NULL)

src/interfaces/libpq/fe-exec.c

+10-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.66 1998/09/03 02:10:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.67 1998/09/04 05:03:02 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1489,12 +1489,15 @@ PQoidStatus(PGresult *res)
14891489
return "";
14901490

14911491
/*
1492-
* The cmdStatus string looks like INSERT oid count\0 In order to be
1493-
* able to return an ordinary C string without damaging the result for
1494-
* PQcmdStatus or PQcmdTuples, we copy the oid part of the string to
1495-
* just after the null, so that cmdStatus looks like INSERT oid
1496-
* count\0oid\0 ^ our return value points here Pretty klugy eh? This
1497-
* routine should've just returned an Oid value.
1492+
* The cmdStatus string looks like
1493+
* INSERT oid count\0
1494+
* In order to be able to return an ordinary C string without
1495+
* damaging the result for PQcmdStatus or PQcmdTuples, we copy
1496+
* the oid part of the string to just after the null, so that
1497+
* cmdStatus looks like
1498+
* INSERT oid count\0oid\0
1499+
* ^ our return value points here
1500+
* Pretty klugy eh? This routine should've just returned an Oid value.
14981501
*/
14991502

15001503
slen = strlen(res->cmdStatus);

src/interfaces/libpq/libpq-fe.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq-fe.h,v 1.41 1998/09/03 02:10:51 momjian Exp $
9+
* $Id: libpq-fe.h,v 1.42 1998/09/04 05:03:05 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -182,7 +182,6 @@ typedef void (*PQnoticeProcessor) (void * arg, const char * message);
182182
extern ConnStatusType PQstatus(PGconn *conn);
183183
extern char *PQerrorMessage(PGconn *conn);
184184
extern int PQsocket(PGconn *conn);
185-
extern int PQsocket(PGconn *conn);
186185
extern int PQbackendPID(PGconn *conn);
187186

188187
/* Enable/disable tracing */

0 commit comments

Comments
 (0)