Re: BUG #14681: Erroneous modulo (%) result

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: marc(at)daelemans(dot)com
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14681: Erroneous modulo (%) result
Date: 2017-05-31 22:34:41
Message-ID: CAEepm=3Tn7S8VCEscD6_EZs6BhzckEJTSagMiB0fgAL=qO+=1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jun 1, 2017 at 9:45 AM, <marc(at)daelemans(dot)com> wrote:
> select i, i&11 as j from generate_series ( 1, 100 ) i ;

That's bitwise AND, not modulo.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2017-05-31 22:37:01 Re: BUG #14681: Erroneous modulo (%) result
Previous Message marc 2017-05-31 21:45:47 BUG #14681: Erroneous modulo (%) result