Re: SQL/JSON: JSON_TABLE

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: SQL/JSON: JSON_TABLE
Дата
Msg-id CAFj8pRCxyZgTSJWoxaKiDUc-BKYgKmzsAMXF2QeKv-dpB6pyrw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SQL/JSON: JSON_TABLE  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Ответы Re: SQL/JSON: JSON_TABLE  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
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



--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Support for jsonpath .datetime() method
Следующее
От: Amit Khandekar
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs