mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Added limitations of bytea type and pg_escape_bytea.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@77241 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
68730b3db9
commit
0f3bace4f8
1 changed files with 18 additions and 3 deletions
|
@ -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 @@ $dbconn4 = pg_connect ($conn_string);
|
|||
</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>
|
||||
|
|
Loading…
Reference in a new issue