From 23e88e25d6d197c25edb99f336aa6d9c77f36fa1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 5 Dec 2002 04:38:30 +0000 Subject: Document get/set bit/byte functions. --- doc/src/sgml/func.sgml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 1ca9371a2d7..d3b4e7555e1 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -473,7 +473,8 @@ PostgreSQL documentation shown in . Bit string arguments to &, |, and # must be of equal length. When bit - shifting, the original length of the string is preserved, as shown in the table. + shifting, the original length of the string is preserved, as shown + in the table. @@ -2120,6 +2121,58 @@ PostgreSQL documentation trim('\\000'::bytea from '\\000Tom\\000'::bytea)Tom + + + get_byte(string, offset) + integer + + Extract byte from string. + + get_byte + + + get_byte('Th\\000omas'::bytea, 4) + 109 + + + + set_byte(string, offset) + bytea + + Set byte in string. + + set_byte + + + set_byte('Th\\000omas'::bytea, 4, 64) + Th\000o@as + + + + get_bit(string, offset) + integer + + Extract bit from string. + + get_bit + + + get_bit('Th\\000omas'::bytea, 45) + 1 + + + + set_bit(string, offset) + bytea + + Set bit in string. + + set_bit + + + set_bit('Th\\000omas'::bytea, 45, 0) + Th\000omAs +
-- cgit v1.2.3