Commits

Andrew Dunstan committed 559ab16

remove debugging code, restore comment

Comments (0)

Files changed (1)

src/backend/utils/adt/json.c

 json_lex(JsonLexContext *lex)
 {
 	char	   *s;
-	char       buff[1024];
+
 	/* Skip leading whitespace. */
 	s = lex->token_terminator;
 	while (*s == ' ' || *s == '\t' || *s == '\n' || *s == '\r')
 			lex->token_type = JSON_TOKEN_FALSE;
 		else
 			report_invalid_token(lex);
-		strncpy(buff, s, p-s);
-		buff[p-s] = '\0';
 	}
 }
 
 		}
 	}
 
-	/* Check for trailing garbage. */
+	/*
+	 * Check for trailing garbage.  As in json_lex(), any alphanumeric stuff
+	 * here should be considered part of the token for error-reporting
+	 * purposes.
+	 */
 	for (p = s; JSON_ALPHANUMERIC_CHAR(*p); p++)
 		error = true;
 	lex->prev_token_terminator = lex->token_terminator;