diff --git a/src/backend/distributed/deparser/citus_deparseutils.c b/src/backend/distributed/deparser/citus_deparseutils.c index f96244a27..6492c14f2 100644 --- a/src/backend/distributed/deparser/citus_deparseutils.c +++ b/src/backend/distributed/deparser/citus_deparseutils.c @@ -31,40 +31,53 @@ optionToStatement(StringInfo buf, DefElem *option, const struct { if (strcmp(name, opt_formats[i].name) == 0) { - switch (opt_formats[i].type) { - case OPTION_FORMAT_STRING: { + switch (opt_formats[i].type) + { + case OPTION_FORMAT_STRING: + { char *value = defGetString(option); appendStringInfo(buf, opt_formats[i].format, quote_identifier(value)); break; } - case OPTION_FORMAT_INTEGER: { + + case OPTION_FORMAT_INTEGER: + { int32 value = defGetInt32(option); appendStringInfo(buf, opt_formats[i].format, value); break; } - case OPTION_FORMAT_BOOLEAN: { + + case OPTION_FORMAT_BOOLEAN: + { bool value = defGetBoolean(option); - appendStringInfo(buf, opt_formats[i].format, value ? "true" : "false"); + appendStringInfo(buf, opt_formats[i].format, value ? "true" : + "false"); break; } + #if PG_VERSION_NUM >= PG_VERSION_15 - case OPTION_FORMAT_OBJECT_ID: { + case OPTION_FORMAT_OBJECT_ID: + { Oid value = defGetObjectId(option); appendStringInfo(buf, opt_formats[i].format, value); break; } + #endif - case OPTION_FORMAT_LITERAL_CSTR: { + case OPTION_FORMAT_LITERAL_CSTR: + { char *value = defGetString(option); - appendStringInfo(buf, opt_formats[i].format, quote_literal_cstr(value)); + appendStringInfo(buf, opt_formats[i].format, quote_literal_cstr( + value)); break; } - default: { + + default: + { elog(ERROR, "unrecognized option type: %d", opt_formats[i].type); break; } } - break; } } } diff --git a/src/backend/distributed/shared_library_init.c b/src/backend/distributed/shared_library_init.c index 886517464..00cdb0027 100644 --- a/src/backend/distributed/shared_library_init.c +++ b/src/backend/distributed/shared_library_init.c @@ -1268,7 +1268,7 @@ RegisterCitusConfigVariables(void) "and DROP DATABASE statements to workers"), NULL, &EnableCreateDatabasePropagation, - true, + false, PGC_USERSET, GUC_STANDARD, NULL, NULL, NULL);