@@ -116,8 +116,8 @@ static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0";
116
116
static void EndCopy (CopyToState cstate );
117
117
static void ClosePipeToProgram (CopyToState cstate );
118
118
static void CopyOneRowTo (CopyToState cstate , TupleTableSlot * slot );
119
- static void CopyAttributeOutText (CopyToState cstate , char * string );
120
- static void CopyAttributeOutCSV (CopyToState cstate , char * string ,
119
+ static void CopyAttributeOutText (CopyToState cstate , const char * string );
120
+ static void CopyAttributeOutCSV (CopyToState cstate , const char * string ,
121
121
bool use_quote , bool single_attr );
122
122
123
123
/* Low-level communications functions */
@@ -1009,10 +1009,10 @@ CopyOneRowTo(CopyToState cstate, TupleTableSlot *slot)
1009
1009
} while (0)
1010
1010
1011
1011
static void
1012
- CopyAttributeOutText (CopyToState cstate , char * string )
1012
+ CopyAttributeOutText (CopyToState cstate , const char * string )
1013
1013
{
1014
- char * ptr ;
1015
- char * start ;
1014
+ const char * ptr ;
1015
+ const char * start ;
1016
1016
char c ;
1017
1017
char delimc = cstate -> opts .delim [0 ];
1018
1018
@@ -1162,11 +1162,11 @@ CopyAttributeOutText(CopyToState cstate, char *string)
1162
1162
* CSV-style escaping
1163
1163
*/
1164
1164
static void
1165
- CopyAttributeOutCSV (CopyToState cstate , char * string ,
1165
+ CopyAttributeOutCSV (CopyToState cstate , const char * string ,
1166
1166
bool use_quote , bool single_attr )
1167
1167
{
1168
- char * ptr ;
1169
- char * start ;
1168
+ const char * ptr ;
1169
+ const char * start ;
1170
1170
char c ;
1171
1171
char delimc = cstate -> opts .delim [0 ];
1172
1172
char quotec = cstate -> opts .quote [0 ];
@@ -1194,7 +1194,7 @@ CopyAttributeOutCSV(CopyToState cstate, char *string,
1194
1194
use_quote = true;
1195
1195
else
1196
1196
{
1197
- char * tptr = ptr ;
1197
+ const char * tptr = ptr ;
1198
1198
1199
1199
while ((c = * tptr ) != '\0' )
1200
1200
{
0 commit comments