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

Commit 5553cbd

Browse files
committed
Add some const decorations
1 parent 9a50f2e commit 5553cbd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/backend/commands/copyto.c

+9-9
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ static const char BinarySignature[11] = "PGCOPY\n\377\r\n\0";
116116
static void EndCopy(CopyToState cstate);
117117
static void ClosePipeToProgram(CopyToState cstate);
118118
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,
121121
bool use_quote, bool single_attr);
122122

123123
/* Low-level communications functions */
@@ -1009,10 +1009,10 @@ CopyOneRowTo(CopyToState cstate, TupleTableSlot *slot)
10091009
} while (0)
10101010

10111011
static void
1012-
CopyAttributeOutText(CopyToState cstate, char *string)
1012+
CopyAttributeOutText(CopyToState cstate, const char *string)
10131013
{
1014-
char *ptr;
1015-
char *start;
1014+
const char *ptr;
1015+
const char *start;
10161016
char c;
10171017
char delimc = cstate->opts.delim[0];
10181018

@@ -1162,11 +1162,11 @@ CopyAttributeOutText(CopyToState cstate, char *string)
11621162
* CSV-style escaping
11631163
*/
11641164
static void
1165-
CopyAttributeOutCSV(CopyToState cstate, char *string,
1165+
CopyAttributeOutCSV(CopyToState cstate, const char *string,
11661166
bool use_quote, bool single_attr)
11671167
{
1168-
char *ptr;
1169-
char *start;
1168+
const char *ptr;
1169+
const char *start;
11701170
char c;
11711171
char delimc = cstate->opts.delim[0];
11721172
char quotec = cstate->opts.quote[0];
@@ -1194,7 +1194,7 @@ CopyAttributeOutCSV(CopyToState cstate, char *string,
11941194
use_quote = true;
11951195
else
11961196
{
1197-
char *tptr = ptr;
1197+
const char *tptr = ptr;
11981198

11991199
while ((c = *tptr) != '\0')
12001200
{

0 commit comments

Comments
 (0)