Re: Precedence of %

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Precedence of %
Date: 2005-06-04 15:55:37
Message-ID: 27481.1117900537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> I don't even grasp what unary modulo actually means???

At some point in the dim mists of prehistory, somebody thought it would
be cute to define prefix % as trunc() and postfix % as round(). I'm not
aware of any precedent for that; it was probably mostly an exercise in
testing out the grammar.

Now that I look, it doesn't look like these operators are documented
at all in the SGML docs, so it sure seems that removing them should be
pretty painless.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Glaesemann 2005-06-04 16:06:05 Re: Precedence of %
Previous Message Bruce Momjian 2005-06-04 15:49:11 Re: Implement support for TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL