]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Clarify bit numbering in get_bit/set_bit etc. Per gripe from
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Aug 2010 21:26:42 +0000 (21:26 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 15 Aug 2010 21:26:42 +0000 (21:26 +0000)
Boszormenyi Zoltan.

doc/src/sgml/func.sgml

index 37130fe8b1e1bd0f90a680be411637c07a411932..28e7a68d8764e7c2780c0dc149fcd43724511d7e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.521.2.2 2010/08/05 18:21:29 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.521.2.3 2010/08/15 21:26:42 tgl Exp $ -->
 
  <chapter id="functions">
   <title>Functions and Operators</title>
    </tgroup>
   </table>
 
+  <para>
+   <function>get_byte</> and <function>set_byte</> number the first byte
+   of a binary string as byte 0.
+   <function>get_bit</> and <function>set_bit</> number bits from the
+   right within each byte; for example bit 0 is the least significant bit of
+   the first byte, and bit 15 is the most significant bit of the second byte.
+  </para>
  </sect1>
 
 
     strings:
     <literal><function>get_bit</function></literal>,
     <literal><function>set_bit</function></literal>.
+    When working with a bit string, these functions number the first
+    (leftmost) bit of the string as bit 0.
    </para>
 
    <para>