Re: [BUGS] BUG #14681: Erroneous modulo (%) result - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: [BUGS] BUG #14681: Erroneous modulo (%) result
Date
Msg-id 20170531223701.gonib5g2uoyb56gs@alvherre.pgsql
Whole thread Raw
In response to [BUGS] BUG #14681: Erroneous modulo (%) result  (marc@daelemans.com)
List pgsql-bugs
marc@daelemans.com wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      14681
> Logged by:          Marc Daelemans
> Email address:      marc@daelemans.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [BUGS] BUG #14681: Erroneous modulo (%) result
Next
From: Andres Freund
Date:
Subject: Re: [BUGS] BUG #14681: Erroneous modulo (%) result