pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Pavel Stehule <pavel.stehule@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Oleg Bartunov <obartunov@gmail.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Subject: Re: SQL/JSON: JSON_TABLE
Date: Tue, 17 Sep 2019 03:04:29 +0300
Message-ID: <94ab028a-07aa-38e5-b184-3d640f642bfb@postgrespro.ru> (raw)
In-Reply-To: <CAFj8pRCxyZgTSJWoxaKiDUc-BKYgKmzsAMXF2QeKv-dpB6pyrw@mail.gmail.com>
References: <132f26c4-dfc6-f8fd-4764-2cbf455a3aec@postgrespro.ru>
	<bf5f479a-ecce-6380-8415-9531e9f919c4@postgrespro.ru>
	<0f26e0d7-fbf9-0bbe-7fe2-4237d2538e5a@postgrespro.ru>
	<bbe6696b-ccd8-ffe2-a913-f808930a1240@postgrespro.ru>
	<3e32fbfd-d046-8f02-24e2-c766415eb5f2@postgrespro.ru>
	<78894d50-010d-0876-23cb-55cba86404e2@postgrespro.ru>
	<fdface69-deda-6e58-cb22-3e57e001923e@postgrespro.ru>
	<CA+q6zcXo7WeBnDoY5W8-ujB16UPs3xKH8LGA=q1_R8=Atb_8_Q@mail.gmail.com>
	<5ded9f9d-cf93-5bd6-a4c3-ad8937245ced@postgrespro.ru>
	<6f5255ce-ae02-d213-49aa-7b86004ab080@postgrespro.ru>
	<c2f32c9f-9a69-202b-a8aa-d93c769a579e@postgrespro.ru>
	<CA+TgmobvF-T6f8Z1LWcR1XzjHG4u8i7TxrAiN8QLzuR=OxLW8Q@mail.gmail.com>
	<deafbced-b992-04f5-64ac-5feeb3942f5c@postgrespro.ru>
	<7f23e8bd-d9fa-1c88-12ad-ded12ea5f221@postgrespro.ru>
	<CAFj8pRCc=7w3Ce1R4o4x8TkSLHrU1Ru+vXUg=qAvCnEUywEAeA@mail.gmail.com>
	<c9dbd1fb-6398-d5bb-19cf-71e71e2f750b@postgrespro.ru>
	<CAFj8pRCxyZgTSJWoxaKiDUc-BKYgKmzsAMXF2QeKv-dpB6pyrw@mail.gmail.com>

On 23.07.2019 16:58, Pavel Stehule wrote:
>
> 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

Fixed in 38th version. Thanks.


> Regress tests diff is not empty - see attached file

Unfortunately, this is not reproducible on my machine, but really seems to be
a bug.


> 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)
>
There obviously should be

node->relabelformat != COERCE_INTERNAL_CAST

Fixed in 38th version. Thanks.

> 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.

FORMAT was moved to unreserved_keywords in the 38th version. I remember that
there was conflicts with FORMAT, but now it works as unreserved_keyword.

>
> 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.
>
Patch 0001 is simply a squash of all 7 patches from the thread
"SQL/JSON: functions".  These patches are preliminary for JSON_TABLE.

Patch 0002 only needs to be review in this thread.

-- 
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

view thread (98+ messages)  latest in thread

Message-ID: <94ab028a-07aa-38e5-b184-3d640f642bfb@postgrespro.ru>
Permalink:  ../94ab028a-07aa-38e5-b184-3d640f642bfb@postgrespro.ru/
Also on:    postgresql.org/message-id/94ab028a-07aa-38e5-b184-3d640f642bfb@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: n.gluhov@postgrespro.ru, pavel.stehule@gmail.com, robertmhaas@gmail.com, 9erthalion6@gmail.com, obartunov@gmail.com, andrew.dunstan@2ndquadrant.com
  Subject: Re: SQL/JSON: JSON_TABLE
  In-Reply-To: <94ab028a-07aa-38e5-b184-3d640f642bfb@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox