index 34c8b805934dc4b62e2e0b8ea5bb7af9e0df2277..20bfd49112a5f44e1b1180c4109f1b060ef5bf06 100644 (file)
@@ -116,8 +116,8 @@ static const char BinarySignature[11] = "PGCOPY\n377円\r\n0円";
static void EndCopy(CopyToState cstate);
static void ClosePipeToProgram(CopyToState cstate);
static void CopyOneRowTo(CopyToState cstate, TupleTableSlot *slot);
-static void CopyAttributeOutText(CopyToState cstate, char *string);
-static void CopyAttributeOutCSV(CopyToState cstate, char *string,
+static void CopyAttributeOutText(CopyToState cstate, const char *string);
+static void CopyAttributeOutCSV(CopyToState cstate, const char *string,
bool use_quote, bool single_attr);
/* Low-level communications functions */
} while (0)
static void
-CopyAttributeOutText(CopyToState cstate, char *string)
+CopyAttributeOutText(CopyToState cstate, const char *string)
{
- char *ptr;
- char *start;
+ const char *ptr;
+ const char *start;
char c;
char delimc = cstate->opts.delim[0];
* CSV-style escaping
*/
static void
-CopyAttributeOutCSV(CopyToState cstate, char *string,
+CopyAttributeOutCSV(CopyToState cstate, const char *string,
bool use_quote, bool single_attr)
{
- char *ptr;
- char *start;
+ const char *ptr;
+ const char *start;
char c;
char delimc = cstate->opts.delim[0];
char quotec = cstate->opts.quote[0];
@@ -1194,7 +1194,7 @@ CopyAttributeOutCSV(CopyToState cstate, char *string,
use_quote = true;
else
{
- char *tptr = ptr;
+ const char *tptr = ptr;
while ((c = *tptr) != '0円')
{