Re: remaining sql/json patches
От | jian he |
---|---|
Тема | Re: remaining sql/json patches |
Дата | |
Msg-id | CACJufxFdB4WQ7f99S2CYHUkuoKGhJ+EPg1qU53d-mt3C7fSJYg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: remaining sql/json patches (jian he <jian.universality@gmail.com>) |
Ответы |
Re: remaining sql/json patches
|
Список | pgsql-hackers |
one more issue..... +-- Extension: non-constant JSON path +SELECT JSON_EXISTS(jsonb '{"a": 123}', '$' || '.' || 'a'); +SELECT JSON_VALUE(jsonb '{"a": 123}', '$' || '.' || 'a'); +SELECT JSON_VALUE(jsonb '{"a": 123}', '$' || '.' || 'b' DEFAULT 'foo' ON EMPTY); +SELECT JSON_QUERY(jsonb '{"a": 123}', '$' || '.' || 'a'); +SELECT JSON_QUERY(jsonb '{"a": 123}', '$' || '.' || 'a' WITH WRAPPER); json path may not be a plain Const. does the following code in expression_tree_walker_impl need to consider cases when the `jexpr->path_spec` part is not a Const? + case T_JsonExpr: + { + JsonExpr *jexpr = (JsonExpr *) node; + + if (WALK(jexpr->formatted_expr)) + return true; + if (WALK(jexpr->result_coercion)) + return true; + if (WALK(jexpr->item_coercions)) + return true; + if (WALK(jexpr->passing_values)) + return true; + /* we assume walker doesn't care about passing_names */ + if (WALK(jexpr->on_empty)) + return true; + if (WALK(jexpr->on_error)) + return true; + }
В списке pgsql-hackers по дате отправления: