Re: extend pgbench expressions with functions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: extend pgbench expressions with functions
Date: 2016-01-29 09:05:58
Message-ID: alpine.DEB.2.10.1601290955060.6449@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Artur Zakirov 2016-01-29 09:10:00 Re: Fuzzy substring searching with the pg_trgm extension
Previous Message Ashutosh Bapat 2016-01-29 08:52:51 Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)