SQL/JSON: JSON_TABLE
Attached patches implementing JSON_TABLE.
This patchset depends on the 8th version of SQL/JSON functions patchset
that was posted in
/messages/by-id/cd0bb935-0158-78a7-08b5-904886deac4b@postgrespro.ru
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 9th version of JSON_TABLE patches rebased onto the latest master.
Documentation drafts written by Oleg Bartunov:
https://github.com/obartunov/sqljsondoc
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 10th version of JSON_TABLE patches rebased onto the latest master.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 11th version of JSON_TABLE patches rebased onto the latest master.
Fixed PLAN DEFAULT flags assignment in gram.y.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 12th version of JSON_TABLE patches rebased onto the latest master.
Fixed JSON_TABLE plan validation.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 13th version of JSON_TABLE patches rebased onto the latest master.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 15th version of JSON_TABLE patches.
Implicit root path name assignment was disabled (it is unclear from standard).
Now all JSON path names are required if the explicit PLAN clause is used.
The documentation for JSON_TABLE can be found now in a separate patch:
/messages/by-id/732208d3-56c3-25a4-8f08-3be1d54ad51b@postgrespro.ru
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 16th version of JSON_TABLE patches.
Changed only results of regression tests after the implicit coercion via I/O
was removed from JSON_VALUE.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On Tue, Jul 3, 2018 at 4:50 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:
Attached 16th version of JSON_TABLE patches.
Changed only results of regression tests after the implicit coercion via I/O
was removed from JSON_VALUE.
Thank you for working on this patch! Unfortunately, the current version of
patch 0015-json_table doesn't not apply anymore without conflicts, could you
please rebase it? In the meantime I'll try to provide some review.
On 26.11.2018 15:55, Dmitry Dolgov wrote:
On Tue, Jul 3, 2018 at 4:50 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:
Attached 16th version of JSON_TABLE patches.
Changed only results of regression tests after the implicit coercion via I/O
was removed from JSON_VALUE.Thank you for working on this patch! Unfortunately, the current version of
patch 0015-json_table doesn't not apply anymore without conflicts, could you
please rebase it? In the meantime I'll try to provide some review.
Attached 20th version of the patches rebased onto the current master.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 21st version of the patches rebased onto the current master.
You can also see all SQL/JSON v21 patches successfully applied in our GitHub
repository on the following branches:
https://github.com/postgrespro/sqljson/tree/sqljson_v21 (one commit per patch)
https://github.com/postgrespro/sqljson/tree/sqljson (original commit history)
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 34th version of the patches.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
0009-Implementation-of-JSON_TABLE-v34.patchtext/x-patch; name=0009-Implementation-of-JSON_TABLE-v34.patchDownload+5334-28
On Thu, Feb 28, 2019 at 8:19 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:
Attached 34th version of the patches.
Kinda strange version numbering -- the last post on this thread is v21.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On 01.03.2019 19:17, Robert Haas wrote:
On Thu, Feb 28, 2019 at 8:19 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:
Attached 34th version of the patches.
Kinda strange version numbering -- the last post on this thread is v21.
For simplicity of dependence tracking, version numbering of JSON_TABLE patches
matches the version numbering of the patches on which it depends -- jsonpath
and SQL/JSON. The corresponding jsonpath patch has version v34 now.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attached 36th version of patches rebased onto jsonpath v36.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Hi
so 29. 6. 2019 v 7:26 odesílatel Nikita Glukhov <n.gluhov@postgrespro.ru>
napsal:
Attached 36th version of patches rebased onto jsonpath v36.
I cannot to apply these patches on master. Please, can you check these
patches?
Regards
Pavel
Show quoted text
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
On 29.06.2019 8:40, Pavel Stehule wrote:
Hi
so 29. 6. 2019 v 7:26 odesílatel Nikita Glukhov
<n.gluhov@postgrespro.ru <mailto:n.gluhov@postgrespro.ru>> napsal:Attached 36th version of patches rebased onto jsonpath v36.
I cannot to apply these patches on master. Please, can you check these
patches?
Attached 37th version of patches rebased onto current master.
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Hi
út 16. 7. 2019 v 16:06 odesílatel Nikita Glukhov <n.gluhov@postgrespro.ru>
napsal:
On 29.06.2019 8:40, Pavel Stehule wrote:
Hi
so 29. 6. 2019 v 7:26 odesílatel Nikita Glukhov <n.gluhov@postgrespro.ru>
napsal:Attached 36th version of patches rebased onto jsonpath v36.
I cannot to apply these patches on master. Please, can you check these
patches?Attached 37th version of patches rebased onto current master.
I got warning
ar crs libpgcommon.a base64.o config_info.o controldata_utils.o d2s.o
exec.o f2s.o file_perm.o ip.o keywords.o kwlookup.o link-canary.o md5.o
pg_lzcompress.o pgfnames.o psprintf.o relpath.o rmtree.o saslprep.o
scram-common.o string.o unicode_norm.o username.o wait_error.>
...skipping...
clauses.c:1076:3: warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
1076 | if (ExecEvalJsonNeedsSubTransaction(jsexpr, NULL))
| ^~
clauses.c:1078:4: note: ...this statement, but the latter is misleadingly
indented as if it were guarded by the ‘if’
1078 | return true;
| ^~~~~~
gcc -Wall -Wmissing-protot
Regress tests diff is not empty - see attached file
some strange fragments from code:
deparseExpr(node->arg, context);
- if (node->relabelformat != COERCE_IMPLICIT_CAST)
+ if (node->relabelformat != COERCE_IMPLICIT_CAST &&
+ node->relabelformat == COERCE_INTERNAL_CAST)
Now, "format" is type_func_name_keyword, so when you use it, then nobody
can use "format" as column name. It can break lot of application. "format"
is common name. It is relatively unhappy, and it can touch lot of users.
This patch set (JSON functions & JSON_TABLE) has more tha 20K rows. More,
there are more than few features are implemented.
Is possible to better (deeper) isolate these features, please? I have
nothing against any implemented feature, but it is hard to work intensively
(hard test) on this large patch. JSON_TABLE has only 184kB, can we start
with this patch?
SQLJSON_FUNCTIONS has 760kB - it is maybe too much for one feature, one
patch.
Pavel
Show quoted text
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachments:
regression.diffsapplication/octet-stream; name=regression.diffsDownload+0-4
Now this is one giant patchset ... and at least the first patch seems to
have more than one thing within -- even the commit message says so. It
seems clear that this is going to take a long time to digest; maybe if
we can get it in smaller pieces we can try to have a little at a time?
In other words, may I suggest to split it up in pieces that can be
reviewed and committed independently?
v37 no longer applies so it requires a rebase, and also typedefs.list
was wrongly merged.
Please update.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On 03.09.2019 20:29, Alvaro Herrera wrote:
Now this is one giant patchset ... and at least the first patch seems to
have more than one thing within -- even the commit message says so. It
seems clear that this is going to take a long time to digest; maybe if
we can get it in smaller pieces we can try to have a little at a time?
In other words, may I suggest to split it up in pieces that can be
reviewed and committed independently?
Patch 0001 is simply a squash of all 7 v38 patches from the thread
"SQL/JSON: functions". These patches are preliminary for JSON_TABLE.
Patch 0002 only needs to be review in this thread.
v37 no longer applies so it requires a rebase, and also typedefs.list
was wrongly merged.
typedefs.list was fixed.
Please update.
Attached 38th version of the patches.
--
Nikita Glukhov
Postgres Professional:http://www.postgrespro.com The Russian Postgres Company