Re: extend pgbench expressions with functions - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: extend pgbench expressions with functions
Date
Msg-id alpine.DEB.2.10.1601290955060.6449@sto
Whole thread Raw
In response to Re: extend pgbench expressions with functions  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: extend pgbench expressions with functions  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers

Hi Michaël,

>> I think it is overkill, but do as you feel.
>
> Perhaps we could have Robert decide on this one first? That's a bug after
> all that had better be backpatched.

Fine with me.

> [modulo...] Right, forgot this one, we just need to check if rval is -1 
> here, and return 0 as result. I am updating the fix as attached.

This looks to me like it works.

I still feel that the condition should be simplified, probably with:
  if (lval < 0 && *resval <= 0) ...

(instead of < in my previous suggestion, if some processors return 0 on 
-INT64_MIN). Also, a comment is needed to explain why such a bizarre 
condition is used/needed for just the INT64_MIN case.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Next
From: Artur Zakirov
Date:
Subject: Re: Fuzzy substring searching with the pg_trgm extension