Hi Narayanan,
I looked into v3. A couple of points points :
1. Like the commit message, I think we should also update the doc to
say that this behaviour is an extension beyond the SQL standard.
2. It might be worth adding one empty form to the existing "Test
JSON_ARRAY deparsing" section in sqljson.sql, since an empty
JSON_ARRAY with NULL ON NULL now prints a form that wasn't possible
before. For example:
SELECT JSON_ARRAY(NULL ON NULL RETURNING jsonb);
CREATE VIEW json_array_view AS
SELECT JSON_ARRAY(NULL ON NULL RETURNING jsonb);
\sv json_array_view
DROP VIEW json_array_view;
which shows JSON_ARRAY( NULL ON NULL RETURNING jsonb) in the view definition.
Please let me know what you think.
Thanks & Regards,
Nitin Motiani
Google