diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index fac4540..a20ac34 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -936,7 +936,7 @@ do
 
       <row>
        <entry><type>bytea</type></entry>
-       <entry><type>char *</type></entry>
+       <entry><type>char *</type>, <type>bytea[<replaceable>n</replaceable>]</type></entry>
       </row>
      </tbody>
     </tgroup>
@@ -1193,6 +1193,36 @@ EXEC SQL END DECLARE SECTION;
 </programlisting>
      </para>
     </sect4>
+
+    <sect4>
+     <title id="ecpg-type-bytea">bytea</title>
+
+     <para>
+      The handling of the <type>bytea</type> type is also similar to
+      the <type>VARCHAR</type>. The definition on an array of type
+      <type>bytea</type> is converted into a named struct for every
+      variable. A declaration like:
+<programlisting>
+bytea var[180];
+</programlisting>
+     is converted into:
+<programlisting>
+struct bytea_var { int len; char arr[180]; } var;
+</programlisting>
+      The member <structfield>arr</structfield> hosts binary format
+      data. It also can handle even <literal>'\0'</literal> as part of
+      data unlike <type>VARCHAR</type>.
+      The data is converted from/to hex format and sent/received by
+      ecpglib.
+     </para>
+
+     <note>
+      <para>
+       <type>bytea</type> variable can be used only when
+       <xref linkend="guc-bytea-output"/> is set to <literal>hex</literal>.
+      </para>
+     </note>
+    </sect4>
    </sect3>
 
    <sect3 id="ecpg-variables-nonprimitive-c">
