Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-11-20 Thread Bruce Momjian
On Tue, Nov 5, 2024 at 05:24:07PM +0800, jian he wrote: > On Thu, Oct 31, 2024 at 11:51 PM Bruce Momjian wrote: > > > > On Fri, Oct 18, 2024 at 10:00:54AM +0800, jian he wrote: > > > On Fri, Oct 18, 2024 at 2:05 AM Bruce Momjian wrote: > > > > Yes, updated patch attached. > > > > > > > looks goo

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-11-05 Thread jian he
On Thu, Oct 31, 2024 at 11:51 PM Bruce Momjian wrote: > > On Fri, Oct 18, 2024 at 10:00:54AM +0800, jian he wrote: > > On Fri, Oct 18, 2024 at 2:05 AM Bruce Momjian wrote: > > > Yes, updated patch attached. > > > > > looks good. > > > > in the meantime, do you think it's necessary to slightly rep

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-31 Thread Bruce Momjian
On Fri, Oct 18, 2024 at 10:00:54AM +0800, jian he wrote: > On Fri, Oct 18, 2024 at 2:05 AM Bruce Momjian wrote: > > Yes, updated patch attached. > > > looks good. > > in the meantime, do you think it's necessary to slightly rephrase > jsonb_path_match doc entry: > > currently doc entry: > jsonb_

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread jian he
On Fri, Oct 18, 2024 at 2:05 AM Bruce Momjian wrote: > > On Thu, Oct 17, 2024 at 02:47:57PM -0300, Marcos Pegoraro wrote: > > Em qui., 17 de out. de 2024 às 13:31, Bruce Momjian > > escreveu: > > > > Oh, okay, but I think we need to say JSON null so we are clear --- patch > > > > > > But true

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread Bruce Momjian
On Thu, Oct 17, 2024 at 02:47:57PM -0300, Marcos Pegoraro wrote: > Em qui., 17 de out. de 2024 às 13:31, Bruce Momjian > escreveu: > > Oh, okay, but I think we need to say JSON null so we are clear --- patch > > > But true, false and null are all JSON, since you cannot do > select jsonb_pat

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread Marcos Pegoraro
Em qui., 17 de out. de 2024 às 13:31, Bruce Momjian escreveu: > Oh, okay, but I think we need to say JSON null so we are clear --- patch > But true, false and null are all JSON, since you cannot do select jsonb_path_query('{}'::jsonb,'$.track.segments[*].HR > 130') = true; So, it would be bette

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread Bruce Momjian
On Thu, Oct 17, 2024 at 10:37:46PM +0800, jian he wrote: > > - false, or unknown. > + false, or NULL. > > nearby are all examples related to jsonb_path_query. > As mentioned before, jsonb_path_query returns JSON null. > so change to > + false, or null > would be better. > > since we

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread jian he
On Thu, Oct 17, 2024 at 9:59 PM Bruce Momjian wrote: > > > > > > >> the predicate: true, false, or unknown." > > > > >> "unknown" is wrong, because `select 'unknown'::jsonb;` will fail. > > > > >> here "unknown" should be "null"? see jsonb_path_query doc entry also. > > > > >> > > > > doc > > (ht

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread Bruce Momjian
On Thu, Oct 17, 2024 at 02:07:00PM +0800, jian he wrote: > On Thu, Oct 17, 2024 at 7:59 AM Bruce Momjian wrote: > > > > > > Where are we on this? I still see this behavior. > > > > --- > > > > but I found following two examp

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-17 Thread Bruce Momjian
On Fri, Jun 21, 2024 at 10:30:08AM +0800, jian he wrote: > hi. > - > 9.16.2.1.1. Boolean Predicate Check Expressions > As an extension to the SQL standard, a PostgreSQL path expression can > be a Boolean predicate, whereas the SQL standard allows predicates > only within filters. While

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-16 Thread jian he
On Thu, Oct 17, 2024 at 7:59 AM Bruce Momjian wrote: > > > Where are we on this? I still see this behavior. > > --- > > but I found following two examples returning different results, > > i think they should return the same

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-10-16 Thread Bruce Momjian
Where are we on this? I still see this behavior. --- On Fri, Jun 21, 2024 at 04:53:55PM +0800, jian he wrote: > On Fri, Jun 21, 2024 at 11:11 AM David G. Johnston > wrote: > > > > On Thu, Jun 20, 2024 at 7:30 PM jian he

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-06-21 Thread jian he
On Fri, Jun 21, 2024 at 11:11 AM David G. Johnston wrote: > > On Thu, Jun 20, 2024 at 7:30 PM jian he wrote: >> >> "predicate check expressions return the single three-valued result of >> >> the predicate: true, false, or unknown." >> "unknown" is wrong, because `select 'unknown'::jsonb;` will fa

Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions

2024-06-20 Thread David G. Johnston
On Thu, Jun 20, 2024 at 7:30 PM jian he wrote: > "predicate check expressions return the single three-valued result of > the predicate: true, false, or unknown." > "unknown" is wrong, because `select 'unknown'::jsonb;` will fail. > here "unknown" should be "null"? see jsonb_path_query doc entry a