8000 Correct volatility markings of a few json functions. · postgrespro/postgres@af2b8fd · GitHub
[go: up one dir, main page]

Skip to content
  • Commit af2b8fd

    Browse files
    committed
    Correct volatility markings of a few json functions.
    json_agg and json_object_agg and their associated transition functions should have been marked as stable rather than immutable, as they call IO functions indirectly. Changing this probably isn't going to make much difference, as you can't use an aggregate function in an index expression, but we should be correct nevertheless. json_object, on the other hand, should be marked immutable rather than stable, as it does not call IO functions. As discussed on -hackers, this change is being made without bumping the catalog version, as we don't want to do that at this stage of the cycle, and the changes are very unlikely to affect anyone.
    1 parent f330a6d commit af2b8fd

    File tree

    1 file changed

    +6
    -6
    lines changed

    1 file changed

    +6
    -6
    lines changed

    src/include/catalog/pg_proc.h

    Lines changed: 6 additions & 6 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4211,17 +4211,17 @@ DATA(insert OID = 3155 ( row_to_json PGNSP PGUID 12 1 0 0 0 f f f f t f s 1
    42114211
    DESCR("map row to json");
    42124212
    DATA(insert OID = 3156 ( row_to_json PGNSP PGUID 12 1 0 0 0 f f f f t f s 2 0 114 "2249 16" _null_ _null_ _null_ _null_ row_to_json_pretty _null_ _null_ _null_ ));
    42134213
    DESCR("map row to json with optional pretty printing");
    4214-
    DATA(insert OID = 3173 ( json_agg_transfn PGNSP PGUID 12 1 0 0 0 f f f f f f i 2 0 2281 "2281 2283" _null_ _null_ _null_ _null_ json_agg_transfn _null_ _null_ _null_ ));
    4214+
    DATA(insert OID = 3173 ( json_agg_transfn PGNSP PGUID 12 1 0 0 0 f f f f f f s 2 0 2281 "2281 2283" _null_ _null_ _null_ _null_ json_agg_transfn _null_ _null_ _null_ ));
    42154215
    DESCR("json aggregate transition function");
    42164216
    DATA(insert OID = 3174 ( json_agg_finalfn PGNSP PGUID 12 1 0 0 0 f f f f f f i 1 0 114 "2281" _null_ _null_ _null_ _null_ json_agg_finalfn _null_ _null_ _null_ ));
    42174217
    DESCR("json aggregate final function");
    4218-
    DATA(insert OID = 3175 ( json_agg PGNSP PGUID 12 1 0 0 0 t f f f f f i 1 0 114 "2283" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ ));
    4218+
    DATA(insert OID = 3175 ( json_agg PGNSP PGUID 12 1 0 0 0 t f f f f f s 1 0 114 "2283" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ ));
    42194219
    DESCR("aggregate input into json");
    4220-
    DATA(insert OID = 3180 ( json_object_agg_transfn PGNSP PGUID 12 1 0 0 0 f f f f f f i 3 0 2281 "2281 2276 2276" _null_ _null_ _null_ _null_ json_object_agg_transfn _null_ _null_ _null_ ));
    4220+
    DATA(insert OID = 3180 ( json_object_agg_transfn PGNSP PGUID 12 1 0 0 0 f f f f f f s 3 0 2281 "2281 2276 2276" _null_ _null_ _null_ _null_ json_object_agg_transfn _null_ _null_ _null_ ));
    42214221
    DESCR("json object aggregate transition function");
    42224222
    DATA(insert OID = 3196 ( json_object_agg_finalfn PGNSP PGUID 12 1 0 0 0 f f f f f f i 1 0 114 "2281" _null_ _null_ _null_ _null_ json_object_agg_finalfn _null_ _null_ _null_ ));
    42234223
    DESCR("json object aggregate final function");
    4224-
    DATA(insert OID = 3197 ( json_object_agg PGNSP PGUID 12 1 0 0 0 t f f f f f i 2 0 114 "2276 2276" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ ));
    4224+
    DATA(insert OID = 3197 ( json_object_agg PGNSP PGUID 12 1 0 0 0 t f f f f f s 2 0 114 "2276 2276" _null_ _null_ _null_ _null_ aggregate_dummy _null_ _null_ _null_ ));
    42254225
    DESCR("aggregate input into a json object");
    42264226
    DATA(insert OID = 3198 ( json_build_array PGNSP PGUID 12 1 0 2276 0 f f f f f f s 1 0 114 "2276" "{2276}" "{v}" _null_ _null_ json_build_array _null_ _null_ _null_ ));
    42274227
    DESCR("build a json array from any inputs");
    @@ -4231,9 +4231,9 @@ DATA(insert OID = 3200 ( json_build_object PGNSP PGUID 12 1 0 2276 0 f f f f
    42314231
    DESCR("build a json object from pairwise key/value inputs");
    42324232
    DATA(insert OID = 3201 ( json_build_object PGNSP PGUID 12 1 0 0 0 f f f f f f s 0 0 114 "" _null_ _null_ _null_ _null_ json_build_object_noargs _null_ _null_ _null_ ));
    42334233
    DESCR("build an empty json object");
    4234-
    DATA(insert OID = 3202 ( json_object PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "1009" _null_ _null_ _null_ _null_ json_object _null_ _null_ _null_ ));
    4234+
    DATA(insert OID = 3202 ( json_object PGNSP PGUID 12 1 0 0 0 f f f f t f i 1 0 114 "1009" _null_ _null_ _null_ _null_ json_object _null_ _null_ _null_ ));
    42354235
    DESCR("map text array of key value pairs to json object");
    4236-
    DATA(insert OID = 3203 ( json_object PGNSP PGUID 12 1 0 0 0 f f f f t f s 2 0 114 "1009 1009" _null_ _null_ _null_ _null_ json_object_two_arg _null_ _null_ _null_ ));
    4236+
    DATA(insert OID = 3203 ( json_object PGNSP PGUID 12 1 0 0 0 f f f f t f i 2 0 114 "1009 1009" _null_ _null_ _null_ _null_ json_object_two_arg _null_ _null_ _null_ ));
    42374237
    DESCR("map text arrays of keys and values to json object");
    42384238
    DATA(insert OID = 3176 ( to_json PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 114 "2283" _null_ _null_ _null_ _null_ to_json _null_ _null_ _null_ ));
    42394239
    DESCR("map input to json");

    0 commit comments

    Comments
     (0)
    0