Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9d0fa3

Browse files
committed
libpgtcl cleanups for Tom Lane.
1 parentb806b3d commite9d0fa3

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

‎src/interfaces/libpgtcl/pgtclCmds.c

Lines changed: 2 additions & 3 deletions
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

Lines changed: 10 additions & 7 deletions
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

Lines changed: 1 addition & 2 deletions
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
externConnStatusTypePQstatus(PGconn*conn);
183183
externchar*PQerrorMessage(PGconn*conn);
184184
externintPQsocket(PGconn*conn);
185-
externintPQsocket(PGconn*conn);
186185
externintPQbackendPID(PGconn*conn);
187186

188187
/* Enable/disable tracing */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp