yohgaki Mon Apr 8 20:30:50 2002 EDT
Modified files:
/phpdoc/en/functions pgsql.xml
Log:
Added limitations of bytea type and pg_escape_bytea.
Index: phpdoc/en/functions/pgsql.xml
diff -u phpdoc/en/functions/pgsql.xml:1.78 phpdoc/en/functions/pgsql.xml:1.79
--- phpdoc/en/functions/pgsql.xml:1.78 Sun Apr 7 19:54:08 2002
+++ phpdoc/en/functions/pgsql.xml Mon Apr 8 20:30:49 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.78 $ -->
+<!-- $Revision: 1.79 $ -->
<reference id="ref.pgsql">
<title>PostgreSQL functions</title>
<titleabbrev>PostgreSQL</titleabbrev>
@@ -2292,8 +2292,23 @@
</para>
<note>
<para>
- This function is requires PostgreSQL 7.2 or later.
- </para>
+ When you SELECT bytea type, PostgreSQL returns octal byte value
+ prefixed by \. (e.g. \032) Users are supposed to convert back to
+ binary formant by yourself.
+ </para>
+ <para>
+ This function requires PostgreSQL 7.2 or later. With PostgreSQL
+ 7.2.0 and 7.2.1, bytea type must be casted when you enable
+ multi-byte support. i.e. <literal>INSERT INTO test_table (image)
+ VALUES ('$image_escaped'::bytea);</literal> PostgreSQL 7.2.2 or
+ later does not need cast. Exception is when client and backend
+ character encoding does not match, there may be multi-byte
+ stream error. User must cast to bytea to avoid this error.
+ </para>
+ <para>
+ Newer PostgreSQL will support unescape function. Support for
+ built-in unescape function will be added when it's available.
+ </para>
</note>
<para>
See also <function>pg_escape_string</function>