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

Commit24eebc6

Browse files
committed
Remove unused 'countincludesself' argument to pq_sendcountedtext()
It has been unused since we removed support for protocol version 2.
1 parent0dd094c commit24eebc6

File tree

6 files changed

+14
-19
lines changed

6 files changed

+14
-19
lines changed

‎src/backend/access/common/printsimple.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
9595

9696
pq_sendcountedtext(&buf,
9797
VARDATA_ANY(t),
98-
VARSIZE_ANY_EXHDR(t),
99-
false);
98+
VARSIZE_ANY_EXHDR(t));
10099
}
101100
break;
102101

@@ -107,7 +106,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
107106
intlen;
108107

109108
len=pg_ltoa(num,str);
110-
pq_sendcountedtext(&buf,str,len, false);
109+
pq_sendcountedtext(&buf,str,len);
111110
}
112111
break;
113112

@@ -118,7 +117,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
118117
intlen;
119118

120119
len=pg_lltoa(num,str);
121-
pq_sendcountedtext(&buf,str,len, false);
120+
pq_sendcountedtext(&buf,str,len);
122121
}
123122
break;
124123

@@ -129,7 +128,7 @@ printsimple(TupleTableSlot *slot, DestReceiver *self)
129128
intlen;
130129

131130
len=pg_ultoa_n(num,str);
132-
pq_sendcountedtext(&buf,str,len, false);
131+
pq_sendcountedtext(&buf,str,len);
133132
}
134133
break;
135134

‎src/backend/access/common/printtup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ printtup(TupleTableSlot *slot, DestReceiver *self)
355355
char*outputstr;
356356

357357
outputstr=OutputFunctionCall(&thisState->finfo,attr);
358-
pq_sendcountedtext(buf,outputstr,strlen(outputstr), false);
358+
pq_sendcountedtext(buf,outputstr,strlen(outputstr));
359359
}
360360
else
361361
{

‎src/backend/libpq/pqformat.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,30 +133,27 @@ pq_sendbytes(StringInfo buf, const void *data, int datalen)
133133
*pq_sendcountedtext - append a counted text string (with character set conversion)
134134
*
135135
* The data sent to the frontend by this routine is a 4-byte count field
136-
* followed by the string. The count includes itself or not, as per the
137-
* countincludesself flag (pre-3.0 protocol requires it to include itself).
138-
* The passed text string need not be null-terminated, and the data sent
139-
* to the frontend isn't either.
136+
* followed by the string. The count does not include itself, as required by
137+
* protocol version 3.0. The passed text string need not be null-terminated,
138+
* and the data sent to the frontend isn't either.
140139
* --------------------------------
141140
*/
142141
void
143-
pq_sendcountedtext(StringInfobuf,constchar*str,intslen,
144-
boolcountincludesself)
142+
pq_sendcountedtext(StringInfobuf,constchar*str,intslen)
145143
{
146-
intextra=countincludesself ?4 :0;
147144
char*p;
148145

149146
p=pg_server_to_client(str,slen);
150147
if (p!=str)/* actual conversion has been done? */
151148
{
152149
slen=strlen(p);
153-
pq_sendint32(buf,slen+extra);
150+
pq_sendint32(buf,slen);
154151
appendBinaryStringInfoNT(buf,p,slen);
155152
pfree(p);
156153
}
157154
else
158155
{
159-
pq_sendint32(buf,slen+extra);
156+
pq_sendint32(buf,slen);
160157
appendBinaryStringInfoNT(buf,str,slen);
161158
}
162159
}

‎src/backend/replication/logical/proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ logicalrep_write_tuple(StringInfo out, Relation rel, TupleTableSlot *slot,
851851

852852
pq_sendbyte(out,LOGICALREP_COLUMN_TEXT);
853853
outputstr=OidOutputFunctionCall(typclass->typoutput,values[i]);
854-
pq_sendcountedtext(out,outputstr,strlen(outputstr), false);
854+
pq_sendcountedtext(out,outputstr,strlen(outputstr));
855855
pfree(outputstr);
856856
}
857857

‎src/backend/tcop/fastpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ SendFunctionResult(Datum retval, bool isnull, Oid rettype, int16 format)
8585

8686
getTypeOutputInfo(rettype,&typoutput,&typisvarlena);
8787
outputstr=OidOutputFunctionCall(typoutput,retval);
88-
pq_sendcountedtext(&buf,outputstr,strlen(outputstr), false);
88+
pq_sendcountedtext(&buf,outputstr,strlen(outputstr));
8989
pfree(outputstr);
9090
}
9191
elseif (format==1)

‎src/include/libpq/pqformat.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ extern void pq_endmessage(StringInfo buf);
2323
externvoidpq_endmessage_reuse(StringInfobuf);
2424

2525
externvoidpq_sendbytes(StringInfobuf,constvoid*data,intdatalen);
26-
externvoidpq_sendcountedtext(StringInfobuf,constchar*str,intslen,
27-
boolcountincludesself);
26+
externvoidpq_sendcountedtext(StringInfobuf,constchar*str,intslen);
2827
externvoidpq_sendtext(StringInfobuf,constchar*str,intslen);
2928
externvoidpq_sendstring(StringInfobuf,constchar*str);
3029
externvoidpq_send_ascii_string(StringInfobuf,constchar*str);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp