From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | phd2(at)earthling(dot)net |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Modulo syntax |
Date: | 1999-03-17 22:01:56 |
Message-ID: | 199903172201.RAA17748@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Fixed now.
> Hello!
>
> I ran the query
> update producers SET cor_id = producer_id % 9 + 1;
>
> and found that result is eqiuvalent to
> update producers SET cor_id = producer_id % 9;
>
> I added parens:
> update producers SET cor_id = (producer_id % 9) + 1;
>
> and got what I needed.
>
> Is it a bug, a feature, or I just misinterpreted the syntax?
>
> Oleg.
> ----
> Oleg Broytmann http://members.xoom.com/phd2/ phd2(at)earthling(dot)net
> Programmers don't die, they just GOSUB without RETURN.
>
>
>
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Vince Vielhaber | 1999-03-17 22:13:48 | & |
Previous Message | Michael Davis | 1999-03-17 21:46:29 | RE: [HACKERS] Use of multiple || and precidence |