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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: marc(at)daelemans(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14681: Erroneous modulo (%) result
Date: 2017-05-31 22:37:01
Message-ID: 20170531223701.gonib5g2uoyb56gs@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

marc(at)daelemans(dot)com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14681
> Logged by: Marc Daelemans
> Email address: marc(at)daelemans(dot)com
> PostgreSQL version: 9.6.3
> Operating system: Win8.1 x64
> Description:
>
> select i, i&11 as j from generate_series ( 1, 100 ) i ;

Note that you're using the & operator (bitwise and) rather than % here.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2017-05-31 22:37:49 Re: BUG #14681: Erroneous modulo (%) result
Previous Message Thomas Munro 2017-05-31 22:34:41 Re: BUG #14681: Erroneous modulo (%) result