Merge pull request #2041 from citusdata/make_skip_jsonb_validation_in_copy_off

Change default to false for citus.skip_jsonb_validation_in_copy
pull/2035/head
Metin Döşlü 2018-03-06 14:43:58 +03:00 committed by GitHub
commit 27d159d6f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -519,9 +519,9 @@ RegisterCitusConfigVariables(void)
"be higher. This setting does not apply if the input format is " "be higher. This setting does not apply if the input format is "
"binary."), "binary."),
&SkipJsonbValidationInCopy, &SkipJsonbValidationInCopy,
true, false,
PGC_USERSET, PGC_USERSET,
0, GUC_NO_SHOW_ALL,
NULL, NULL, NULL); NULL, NULL, NULL);
DefineCustomIntVariable( DefineCustomIntVariable(

View File

@ -1120,6 +1120,8 @@ SELECT * FROM copy_jsonb ORDER BY key;
\COPY copy_jsonb (key, value) FROM STDIN \COPY copy_jsonb (key, value) FROM STDIN
ERROR: invalid input syntax for type json ERROR: invalid input syntax for type json
DETAIL: The input string ended unexpectedly. DETAIL: The input string ended unexpectedly.
CONTEXT: JSON data, line 1: {"r":255,"g":0,"b":0
COPY copy_jsonb, line 1, column value: "{"r":255,"g":0,"b":0"
TRUNCATE copy_jsonb; TRUNCATE copy_jsonb;
SET citus.skip_jsonb_validation_in_copy TO off; SET citus.skip_jsonb_validation_in_copy TO off;
-- JSONB from text should work -- JSONB from text should work