diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-15 21:26:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-08-15 21:26:36 +0000 |
commit | 521c26ebf7fddb6fa9338b5a40d09a78f58b4377 (patch) | |
tree | 531169c2d3485d6c68ee0d831991180085431b3f | |
parent | d915a275c13347bac5fd62151c57f0b9ab763e19 (diff) | |
download | postgresql-521c26ebf7fddb6fa9338b5a40d09a78f58b4377.tar.gz postgresql-521c26ebf7fddb6fa9338b5a40d09a78f58b4377.zip |
Clarify bit numbering in get_bit/set_bit etc. Per gripe from
Boszormenyi Zoltan.
-rw-r--r-- | doc/src/sgml/func.sgml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 562ba485d23..96cd077ef84 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.527 2010/08/13 18:36:23 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.528 2010/08/15 21:26:36 tgl Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -2864,6 +2864,13 @@ </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> @@ -2969,6 +2976,8 @@ 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> |