Document the exponentiation operator as associating left to right.
authorTom Lane <[email protected]>
Mon, 28 Dec 2015 17:09:00 +0000 (12:09 -0500)
committerTom Lane <[email protected]>
Mon, 28 Dec 2015 17:09:32 +0000 (12:09 -0500)
Common mathematical convention is that exponentiation associates right to
left.  We aren't going to change the parser for this, but we could note
it in the operator's description.  (It's already noted in the operator
precedence/associativity table, but users might not look there.)
Per bug #13829 from Henrik Pauli.

doc/src/sgml/func.sgml

index 36b6f050a41f468e75a0bca7ca6ed902f7e490d0..416ef1abd5d746a1af68ce569b0ef9ee5ebe2d9b 100644 (file)
 
       <row>
        <entry> <literal>^</literal> </entry>
-       <entry>exponentiation</entry>
+       <entry>exponentiation (associates left to right)</entry>
        <entry><literal>2.0 ^ 3.0</literal></entry>
        <entry><literal>8</literal></entry>
       </row>