On 21.06.23 10:25, Amit Langote wrote:
I realized that the patch for the "other sql/json functions" part is
relatively straightforward and has no dependence on the "sql/json
query functions" part getting done first. So I've made that one the
0001 patch. The patch I posted in the last email is now 0002, though
it only has changes related to changing the order of the patch, so I
decided not to change the patch version marker (v1).
(I suggest you change the version number anyway, next time. There are
plenty of numbers available.)
The 0001 patch contains a change to
doc/src/sgml/keywords/sql2016-02-reserved.txt, which seems
inappropriate. The additional keywords are already listed in the 2023
file, and they are not SQL:2016 keywords.
Another thing, I noticed that the SQL/JSON patches in PG16 introduced
some nonstandard indentation in gram.y. I would like to apply the
attached patch to straighten this out.diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 39ab7eac0d..edb6c00ece 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -645,23 +645,20 @@ static Node *makeRecursiveViewSelect(char *relname, List
*aliases, Node *query);
%type <list> hash_partbound
%type <defelt> hash_partbound_elem
+%type <node> json_format_clause_opt
+ json_value_expr
+ json_output_clause_opt
+ json_name_and_value
+ json_aggregate_func
+%type <list> json_name_and_value_list
+ json_value_expr_list
+ json_array_aggregate_order_by_clause_opt
+%type <ival> json_encoding_clause_opt
+ json_predicate_type_constraint
+%type <boolean> json_key_uniqueness_constraint_opt
+ json_object_constructor_null_clause_opt
+ json_array_constructor_null_clause_opt
-%type <node> json_format_clause_opt
- json_value_expr
- json_output_clause_opt
- json_name_and_value
- json_aggregate_func
-
-%type <list> json_name_and_value_list
- json_value_expr_list
- json_array_aggregate_order_by_clause_opt
-
-%type <ival> json_encoding_clause_opt
- json_predicate_type_constraint
-
-%type <boolean> json_key_uniqueness_constraint_opt
- json_object_constructor_null_clause_opt
- json_array_constructor_null_clause_opt
/*
* Non-keyword token types. These are hard-wired into the "flex" lexer.