Re: remaining sql/json patches

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Andrew Dunstan <andrew@dunslane.net>, jian he <jian.universality@gmail.com>, Erik Rijkers <er@xs4all.nl>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-11-24T12:27:56Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. SQL/JSON: Various improvements to SQL/JSON query function docs

  2. SQL/JSON: Fix some obsolete comments.

  3. SQL/JSON: Fix issues with DEFAULT .. ON ERROR / EMPTY

  4. JSON_TABLE: Add support for NESTED paths and columns

  5. Fix JsonExpr deparsing to emit QUOTES and WRAPPER correctly

  6. Fix typo introduced in 6185c9737

  7. Add basic JSON_TABLE() functionality

  8. Avoid splitting errmsg string to span multiple lines

  9. Add SQL/JSON query functions

  10. Implement various jsonpath methods

  11. Add soft error handling to some expression nodes

  12. Adjust populate_record_field() to handle errors softly

  13. Refactor code used by jsonpath executor to fetch variables

  14. Test EXPLAIN (FORMAT JSON) ... XMLTABLE

  15. Simplify productions for FORMAT JSON [ ENCODING name ]

  16. Add trailing commas to enum definitions

  17. doc: add missing <returnvalue> and whitespace

  18. Add more SQL/JSON constructor functions

  19. Rename a nonterminal used in SQL/JSON grammar

  20. Some refactoring to export json(b) conversion functions

  21. Don't include CaseTestExpr in JsonValueExpr.formatted_expr

  22. Code review for commit b6e1157e7d

  23. Pass constructName to transformJsonValueExpr()

  24. Unify JSON categorize type API and export for external use

  25. Make some indentation in gram.y consistent

  26. Allow most keywords to be used as column labels without requiring AS.

  27. Reduce size of backend scanner's tables.

  28. Use perfect hashing, instead of binary search, for keyword lookup.

Attachments

Some quick grepping gave me this table,

                 YYLAST  YYNTOKENS  YYNNTS   YYNRULES   YYNSTATES  YYMAXUTOK
REL9_1_STABLE     69680        429     546       2218        4179        666
REL9_2_STABLE     73834        432     546       2261        4301        669
REL9_3_STABLE     77969        437     558       2322        4471        674
REL9_4_STABLE     79419        442     576       2369        4591        679
REL9_5_STABLE     92495        456     612       2490        4946        693
REL9_6_STABLE     92660        459     618       2515        5006        696
REL_10_STABLE     99601        472     653       2663        5323        709
REL_11_STABLE    102007        480     668       2728        5477        717
REL_12_STABLE    103948        482     667       2724        5488        719
REL_13_STABLE    104224        492     673       2760        5558        729
REL_14_STABLE    108111        503     676       3159        5980        740
REL_15_STABLE    111091        506     688       3206        6090        743
REL_16_STABLE    115435        519     706       3283        6221        756
master           117115        521     707       3300        6255        758
master+v26       121817        537     738       3415        6470        774

and the attached chart.  (v26 is with all patches applied, including the
JSON_TABLE one whose grammar has not yet been fully tweaked.)

So, while the jump from v26 is not a trivial one, it seems within
reasonable bounds.  For example, the jump between 13 and 14 looks worse.
(I do wonder what happened there.)

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Cada quien es cada cual y baja las escaleras como quiere" (JMSerrat)