mirror of https://github.com/citusdata/citus.git
Ruleutils_17 Add more SQL/JSON constructor functions
Relevant PG commit:
03734a7fed7d924679770adb78a7db8a37d14188
03734a7fed
m3hm3t/pg17_isolation_test_cmd_from
parent
728fe5c921
commit
978fdc2166
|
@ -7622,6 +7622,15 @@ get_json_constructor(JsonConstructorExpr *ctor, deparse_context *context,
|
||||||
case JSCTOR_JSON_ARRAY:
|
case JSCTOR_JSON_ARRAY:
|
||||||
funcname = "JSON_ARRAY";
|
funcname = "JSON_ARRAY";
|
||||||
break;
|
break;
|
||||||
|
case JSCTOR_JSON_PARSE:
|
||||||
|
funcname = "JSON";
|
||||||
|
break;
|
||||||
|
case JSCTOR_JSON_SCALAR:
|
||||||
|
funcname = "JSON_SCALAR";
|
||||||
|
break;
|
||||||
|
case JSCTOR_JSON_SERIALIZE:
|
||||||
|
funcname = "JSON_SERIALIZE";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
elog(ERROR, "invalid JsonConstructorType %d", ctor->type);
|
elog(ERROR, "invalid JsonConstructorType %d", ctor->type);
|
||||||
}
|
}
|
||||||
|
@ -7669,7 +7678,12 @@ get_json_constructor_options(JsonConstructorExpr *ctor, StringInfo buf)
|
||||||
if (ctor->unique)
|
if (ctor->unique)
|
||||||
appendStringInfoString(buf, " WITH UNIQUE KEYS");
|
appendStringInfoString(buf, " WITH UNIQUE KEYS");
|
||||||
|
|
||||||
get_json_returning(ctor->returning, buf, true);
|
/*
|
||||||
|
* Append RETURNING clause if needed; JSON() and JSON_SCALAR() don't
|
||||||
|
* support one.
|
||||||
|
*/
|
||||||
|
if (ctor->type != JSCTOR_JSON_PARSE && ctor->type != JSCTOR_JSON_SCALAR)
|
||||||
|
get_json_returning(ctor->returning, buf, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue