Re: pgsql: Implement jsonpath .datetime() method - Mailing list pgsql-committers

From Alexander Korotkov
Subject Re: pgsql: Implement jsonpath .datetime() method
Date
Msg-id CAPpHfduBCj+bv7ii6s0P-pOL5FW8fLZwGVsG-t3QsQ5FXuoTxA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Implement jsonpath .datetime() method  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Implement jsonpath .datetime() method  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Thu, Sep 26, 2019 at 2:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> > I've noticed buildfarm is unhappy with my commits.
>
> The proximate problem seems to be that compareItems() is insufficiently
> careful to ensure that both values are non-null before passing them
> off to datatype-specific code.  The code accidentally fails to crash
> on 64-bit machines, but it's still giving garbage answers, I think.

I've found compareItems() code to not apply appropriate cast to/from
Datum.  Fixed in 7881bb14f4.  This makes test pass on my local 32-bit
machine.  I'll keep look on buildfarm.

It seems that caller (executePredicate()) don't NULL values to
compareItems().  It does do only for predicates, which doesn't have
right argument.  But binary predicate with lacking argument should be
detected during syntactic analysis.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Implement jsonpath .datetime() method
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Support reloptions of enum type