Modulo syntax

Поиск
Список
Период
Сортировка
От Oleg Broytmann
Тема Modulo syntax
Дата
Msg-id Pine.SOL2.3.96.SK.990317114623.27908A-100000@sun.med.ru
обсуждение исходный текст
Ответы Re: [HACKERS] Modulo syntax  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] Modulo syntax  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
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@earthling.net          Programmers don't die, they
justGOSUB without RETURN.
 



В списке pgsql-hackers по дате отправления:

Предыдущее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Re: Developers Globe (FINAL)
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Re: Developers Globe (FINAL)