Re: SQL/JSON path issues/questions

2019-07-23 Thread Steven Pousty
Ok I have the toolset. Where do I find the PR for the doc on this work. I only feel qualified to review the doc. Thanks Steve On Sat, Jul 20, 2019 at 11:48 AM Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > Hi Steven, > > On Fri, Jul 19, 2019 at 9:53 PM Steven Pousty > wrote: > > I

Re: SQL/JSON path issues/questions

2019-07-20 Thread Steven Pousty
Thanks so much, hope to get to it over this weekend. On Sat, Jul 20, 2019, 11:48 AM Alexander Korotkov wrote: > Hi Steven, > > On Fri, Jul 19, 2019 at 9:53 PM Steven Pousty > wrote: > > I would like to help review this documentation. Can you please point me > in the right direction? > > Thank

Re: SQL/JSON path issues/questions

2019-07-20 Thread Alexander Korotkov
Hi Steven, On Fri, Jul 19, 2019 at 9:53 PM Steven Pousty wrote: > I would like to help review this documentation. Can you please point me in > the right direction? Thank you for your interest. You're welcome to do review. Please take a look at instruction for reviewing a patch [1] and

Re: SQL/JSON path issues/questions

2019-07-19 Thread Steven Pousty
I would like to help review this documentation. Can you please point me in the right direction? Thanks Steve On Fri, Jul 19, 2019 at 2:02 AM Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Jul 18, 2019 at 5:08 PM Thom Brown wrote: > > On Tue, 16 Jul 2019 at 19:44, Alexander

Re: SQL/JSON path issues/questions

2019-07-19 Thread Alexander Korotkov
On Thu, Jul 18, 2019 at 5:08 PM Thom Brown wrote: > On Tue, 16 Jul 2019 at 19:44, Alexander Korotkov > wrote: > > > > On Tue, Jul 16, 2019 at 9:22 PM Thom Brown wrote: > > > Now I'm looking at the @? and @@ operators, and getting a bit > > > confused. This following query returns true, but I

Re: SQL/JSON path issues/questions

2019-07-18 Thread Thom Brown
On Tue, 16 Jul 2019 at 19:44, Alexander Korotkov wrote: > > On Tue, Jul 16, 2019 at 9:22 PM Thom Brown wrote: > > Now I'm looking at the @? and @@ operators, and getting a bit > > confused. This following query returns true, but I can't determine > > why: > > > > # SELECT

Re: SQL/JSON path issues/questions

2019-07-16 Thread Thom Brown
On Thu, 11 Jul 2019 at 16:23, Alexander Korotkov wrote: > > On Thu, Jul 11, 2019 at 5:10 PM Thom Brown wrote: > > On Wed, 10 Jul 2019 at 05:58, Alexander Korotkov > > wrote: > > > > > > On Mon, Jul 8, 2019 at 12:30 AM Alexander Korotkov > > > wrote: > > > > On Thu, Jul 4, 2019 at 4:38 PM

Re: SQL/JSON path issues/questions

2019-07-11 Thread Alexander Korotkov
On Thu, Jul 11, 2019 at 5:10 PM Thom Brown wrote: > On Wed, 10 Jul 2019 at 05:58, Alexander Korotkov > wrote: > > > > On Mon, Jul 8, 2019 at 12:30 AM Alexander Korotkov > > wrote: > > > On Thu, Jul 4, 2019 at 4:38 PM Liudmila Mantrova > > > wrote: > > > > Thank you! > > > > > > > > I think we

Re: SQL/JSON path issues/questions

2019-07-11 Thread Thom Brown
On Wed, 10 Jul 2019 at 05:58, Alexander Korotkov wrote: > > On Mon, Jul 8, 2019 at 12:30 AM Alexander Korotkov > wrote: > > On Thu, Jul 4, 2019 at 4:38 PM Liudmila Mantrova > > wrote: > > > Thank you! > > > > > > I think we can make this sentence even shorter, the fix is attached: > > > > > >

Re: SQL/JSON path issues/questions

2019-07-09 Thread Alexander Korotkov
On Mon, Jul 8, 2019 at 12:30 AM Alexander Korotkov wrote: > On Thu, Jul 4, 2019 at 4:38 PM Liudmila Mantrova > wrote: > > Thank you! > > > > I think we can make this sentence even shorter, the fix is attached: > > > > "To refer to a JSON element stored at a lower nesting level, add one or > >

Re: SQL/JSON path issues/questions

2019-07-07 Thread Alexander Korotkov
On Thu, Jul 4, 2019 at 4:38 PM Liudmila Mantrova wrote: > Thank you! > > I think we can make this sentence even shorter, the fix is attached: > > "To refer to a JSON element stored at a lower nesting level, add one or > more accessor operators after @." Thanks, looks good to me. Attached

Re: SQL/JSON path issues/questions

2019-07-04 Thread Liudmila Mantrova
On 7/3/19 11:59 PM, Alexander Korotkov wrote: Hi! On Wed, Jul 3, 2019 at 5:27 PM Liudmila Mantrova wrote: I have rechecked the standard and I agree that we should use "filter expression" whenever possible. "A filter expression must be enclosed in parentheses..." looks like an oversight, so I

Re: SQL/JSON path issues/questions

2019-07-03 Thread Alexander Korotkov
Hi! On Wed, Jul 3, 2019 at 5:27 PM Liudmila Mantrova wrote: > > I have rechecked the standard and I agree that we should use "filter > expression" whenever possible. > "A filter expression must be enclosed in parentheses..." looks like an > oversight, so I fixed it. As for what's actually

Re: SQL/JSON path issues/questions

2019-07-03 Thread Liudmila Mantrova
On 6/28/19 6:47 AM, Alexander Korotkov wrote: On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova wrote: Thank you for the catch! Please see the modified version of patch 0004 attached. I tried to review and revise the part related to filters, but I failed because I don't understand the notions

Re: SQL/JSON path issues/questions

2019-06-28 Thread Alexander Korotkov
On Fri, Jun 28, 2019 at 9:01 AM Oleg Bartunov wrote: > On Fri, Jun 28, 2019 at 8:10 AM Alvaro Herrera > wrote: > > > > On 2019-Jun-28, Alexander Korotkov wrote: > > > > > On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova > > > wrote: > > > > Thank you for the catch! Please see the modified

Re: SQL/JSON path issues/questions

2019-06-28 Thread Oleg Bartunov
On Fri, Jun 28, 2019 at 8:10 AM Alvaro Herrera wrote: > > On 2019-Jun-28, Alexander Korotkov wrote: > > > On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova > > wrote: > > > Thank you for the catch! Please see the modified version of patch 0004 > > > attached. > > > > I tried to review and revise

Re: SQL/JSON path issues/questions

2019-06-27 Thread Alvaro Herrera
On 2019-Jun-28, Alexander Korotkov wrote: > On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova > wrote: > > Thank you for the catch! Please see the modified version of patch 0004 > > attached. > > I tried to review and revise the part related to filters, but I failed > because I don't understand

Re: SQL/JSON path issues/questions

2019-06-27 Thread Alexander Korotkov
On Tue, Jun 25, 2019 at 6:38 PM Liudmila Mantrova wrote: > Thank you for the catch! Please see the modified version of patch 0004 > attached. I tried to review and revise the part related to filters, but I failed because I don't understand the notions used in the documentation. What is the

Re: SQL/JSON path issues/questions

2019-06-27 Thread Alexander Korotkov
On Thu, Jun 27, 2019 at 4:57 PM Thom Brown wrote: > On Wed, 19 Jun 2019 at 20:04, Alexander Korotkov > wrote: > > On Wed, Jun 19, 2019 at 7:07 PM Thom Brown wrote: > > > On Thu, 13 Jun 2019 at 14:59, Thom Brown wrote: > > > Also, this example doesn't work: > > > > > > '$.track ? (@.segments[*]

Re: SQL/JSON path issues/questions

2019-06-27 Thread Thom Brown
On Wed, 19 Jun 2019 at 20:04, Alexander Korotkov wrote: > > On Wed, Jun 19, 2019 at 7:07 PM Thom Brown wrote: > > On Thu, 13 Jun 2019 at 14:59, Thom Brown wrote: > > > > > > Hi, > > > > > > I've been reading through the documentation regarding jsonpath and > > > jsonb_path_query etc., and I

Re: SQL/JSON path issues/questions

2019-06-25 Thread Liudmila Mantrova
On 6/21/19 8:04 PM, Alexander Korotkov wrote: On Wed, Jun 19, 2019 at 10:14 PM Alexander Korotkov wrote: While I have no objections to the proposed fixes, I think we can further improve patch 0003 and the text it refers to. In attempt to clarify jsonpath docs and address the concern that ? is

Re: SQL/JSON path issues/questions

2019-06-21 Thread Alexander Korotkov
On Wed, Jun 19, 2019 at 10:14 PM Alexander Korotkov wrote: > > While I have no objections to the proposed fixes, I think we can further > > improve patch 0003 and the text it refers to. > > In attempt to clarify jsonpath docs and address the concern that ? is > > hard to trace in the current

Re: SQL/JSON path issues/questions

2019-06-19 Thread Alexander Korotkov
Hi, Liudmila! > While I have no objections to the proposed fixes, I think we can further > improve patch 0003 and the text it refers to. > In attempt to clarify jsonpath docs and address the concern that ? is > hard to trace in the current text, I'd also like to propose patch 0004. > Please see

Re: SQL/JSON path issues/questions

2019-06-19 Thread Alexander Korotkov
On Wed, Jun 19, 2019 at 7:07 PM Thom Brown wrote: > On Thu, 13 Jun 2019 at 14:59, Thom Brown wrote: > > > > Hi, > > > > I've been reading through the documentation regarding jsonpath and > > jsonb_path_query etc., and I have found it lacking explanation for > > some functionality, and I've also

Re: SQL/JSON path issues/questions

2019-06-19 Thread Alexander Korotkov
On Mon, Jun 17, 2019 at 8:40 PM Thom Brown wrote: > On Fri, 14 Jun 2019 at 08:16, Kyotaro Horiguchi > wrote: > > > > Hi, Thom. > > > > At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown wrote > > in > > > Hi, > > > > > > I've been reading through the documentation regarding jsonpath and > > >

Re: SQL/JSON path issues/questions

2019-06-19 Thread Thom Brown
On Thu, 13 Jun 2019 at 14:59, Thom Brown wrote: > > Hi, > > I've been reading through the documentation regarding jsonpath and > jsonb_path_query etc., and I have found it lacking explanation for > some functionality, and I've also had some confusion when using the > feature. > > ? operator >

Re: SQL/JSON path issues/questions

2019-06-17 Thread Chapman Flack
On 6/17/19 4:13 PM, Alexander Korotkov wrote: > On Mon, Jun 17, 2019 at 8:40 PM Thom Brown wrote: "is unknown" suggests a boolean output, but the example shows an output of "infinity". While I understand what it does, this appears inconsistent with all other "is..." functions

Re: SQL/JSON path issues/questions

2019-06-17 Thread Alexander Korotkov
On Mon, Jun 17, 2019 at 8:40 PM Thom Brown wrote: > On Fri, 14 Jun 2019 at 08:16, Kyotaro Horiguchi > wrote: > > > > Hi, Thom. > > > > At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown wrote > > in > > > Hi, > > > > > > I've been reading through the documentation regarding jsonpath and > > >

Re: SQL/JSON path issues/questions

2019-06-17 Thread Thom Brown
On Fri, 14 Jun 2019 at 08:16, Kyotaro Horiguchi wrote: > > Hi, Thom. > > At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown wrote > in > > Hi, > > > > I've been reading through the documentation regarding jsonpath and > > jsonb_path_query etc., and I have found it lacking explanation for > > some

Re: SQL/JSON path issues/questions

2019-06-17 Thread Liudmila Mantrova
On 6/17/19 11:36 AM, Alexander Korotkov wrote: I'm going to push attached 3 patches if no objections. Regarding 0003-Separate-two-distinctive-json-errors.patch, I think it requires more thoughts. RETURN_ERROR(ereport(ERROR,

Re: SQL/JSON path issues/questions

2019-06-17 Thread Alexander Korotkov
I'm going to push attached 3 patches if no objections. Regarding 0003-Separate-two-distinctive-json-errors.patch, I think it requires more thoughts. RETURN_ERROR(ereport(ERROR, (errcode(ERRCODE_SINGLETON_JSON_ITEM_REQUIRED),

Re: SQL/JSON path issues/questions

2019-06-14 Thread Alexander Korotkov
On Thu, Jun 13, 2019 at 5:00 PM Thom Brown wrote: > I've been reading through the documentation regarding jsonpath and > jsonb_path_query etc., and I have found it lacking explanation for > some functionality, and I've also had some confusion when using the > feature. BTW, I've some general idea

Re: SQL/JSON path issues/questions

2019-06-14 Thread Alexander Korotkov
Hi! On Fri, Jun 14, 2019 at 10:16 AM Kyotaro Horiguchi wrote: > At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown wrote > in > > Hi, > > > > I've been reading through the documentation regarding jsonpath and > > jsonb_path_query etc., and I have found it lacking explanation for > > some

Re: SQL/JSON path issues/questions

2019-06-14 Thread Kyotaro Horiguchi
Hi, Thom. At Thu, 13 Jun 2019 14:59:51 +0100, Thom Brown wrote in > Hi, > > I've been reading through the documentation regarding jsonpath and > jsonb_path_query etc., and I have found it lacking explanation for > some functionality, and I've also had some confusion when using the > feature. >

SQL/JSON path issues/questions

2019-06-13 Thread Thom Brown
Hi, I've been reading through the documentation regarding jsonpath and jsonb_path_query etc., and I have found it lacking explanation for some functionality, and I've also had some confusion when using the feature. ? operator == The first mention of '?' is in section 9.15, where it says: