Add mention of bytea data type and escaping rules.
authorBruce Momjian
Tue, 4 Sep 2001 03:17:54 +0000 (03:17 +0000)
committerBruce Momjian
Tue, 4 Sep 2001 03:17:54 +0000 (03:17 +0000)
doc/src/sgml/datatype.sgml

index ce9fffa0c27ed6d60140c991b92138714b4f6a00..7efc0a758937facbb68a15196b6fd019af0e7057 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -83,6 +83,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/datatype.sgml,v 1.60 2001/08/31 01:55:25 is
        rectangular box in 2D plane
       
 
+      
+       bytea
+       
+       binary data
+      
+
       
        character(n)
        char(n)
@@ -782,7 +788,11 @@ CREATE TABLE tablename (
    text
    Variable unlimited length
        
-      
+        
+   bytea
+   binary data
+       
+     
      
     
 
@@ -829,6 +839,19 @@ CREATE TABLE tablename (
     standard, many other RDBMS packages have it as well.
    
 
+   
+    The bytea data type allows storage of binary data,
+    specifically allowing storage of NULLs which are entered as
+    '\\000'. The first backslash is interpreted by the
+    single quotes, and the second is recognized by bytea and
+    preceeds a three digit octal value. For a similar reason, a
+    backslash must be entered into a field as '\\\\' or
+    '\\134'. You may also have to escape line feeds and
+    carriage return if your interface automatically translates these. It
+    can store values of any length. Bytea is a non-standard
+    data type.
+   
+
    
     The storage requirement for data of these types is 4 bytes plus
     the actual string, and in case of character plus the