cvs: phpdoc-it /reference/pgsql/functions pg-fetch-assoc.xml pg-get-notify.xml pg-get-pid.xml pg-ping.xml pg-result-seek.xml pg-unescape-bytea.xml
| From: | Marco Cucinato | Date: | Sun, 23 Feb 2003 08:51:44 +0000 |
| Subject: | cvs: phpdoc-it /reference/pgsql/functions pg-fetch-assoc.xml pg-get-notify.xml pg-get-pid.xml pg-ping.xml pg-result-seek.xml pg-unescape-bytea.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-244@lists.php.net to get a copy of this message | ||
cucinato Sun Feb 23 03:51:44 2003 EDT
Added files:
/phpdoc-it/reference/pgsql/functions pg-fetch-assoc.xml
pg-get-notify.xml
pg-get-pid.xml pg-ping.xml
pg-result-seek.xml
pg-unescape-bytea.xml
Log:
First release
Index: phpdoc-it/reference/pgsql/functions/pg-fetch-assoc.xml +++ phpdoc-it/reference/pgsql/functions/pg-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-assoc"> <refnamediv> <refname>pg_fetch_assoc</refname> <refpurpose>Fetch a row as an array</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_assoc</function> returns an associative array that corresponds to the fetched row (tuples/records). It returns &false;, if there are no more rows. </para> <para> <function>pg_fetch_assoc</function> is an extended version of <function>pg_fetch_row</function>. In addition to storing the data in the numeric indices (field index) to the result array, it also stores the data in associative indices (field name) by default. </para> <para> <parameter>row</parameter> is row (record) number to be retrieved. First row is 0. </para> <para> <function>pg_fetch_assoc</function> is NOT significantly slower than using <function>pg_fetch_row</function>, while it provides a significant ease of use. </para> <para> See also <function>pg_fetch_row</function>, <function>pg_fetch_array</function>, <function>pg_fetch_assoc</function>, <function>pg_fetch_object</function> and <function>pg_fetch_result</function>. </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_assoc ($result, 1, PGSQL_ASSOC); echo $arr["author"] . " <- array\n"; ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-get-notify.xml +++ phpdoc-it/reference/pgsql/functions/pg-get-notify.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <refentry id="function.pg-get-notify"> <refnamediv> <refname>pg_get_notify</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_get_notify</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_notify</function> gets notify message sent by <literal>NOTIFY</literal> SQL command. To recieve nofigy messages, <literal>LISTEN</literal> SQL command must be issued. If there is notify message on the connection, array contains message name and backend PID is returned. If there is no message, &false; is returned. </para> <para> See also <function>pg_get_pid</function> </para> <para> <example> <title>PostgreSQL NOTIFY message</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Listen 'author_updated' message from other processes pq_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) print("No messages\n"); else print_r($notify); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-get-pid.xml +++ phpdoc-it/reference/pgsql/functions/pg-get-pid.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <refentry id="function.pg-get-pid"> <refnamediv> <refname>pg_get_pid</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>pg_get_pid</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_pid</function> gets backend (database server process) PID. PID is useful to check if <literal>NOTIFY</literal> message is sent from other process or not. </para> <para> See also <function>pg_get_notify</function> </para> <para> <example> <title>PostgreSQL backend PID</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Backend process PID. Use PID with pg_get_notify() $pid = pg_get_pid($conn); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-ping.xml +++ phpdoc-it/reference/pgsql/functions/pg-ping.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-ping"> <refnamediv> <refname>pg_ping</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_ping</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_ping</function> ping database connection, try to reconnect if it is broken. It returns &true; if connection is alive, otherwise &false;. </para> <para> See also <function>pg_connection_status</function> and <function>pg_connection_reset</function>. </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } if (!pg_ping($conn)) die("Connection is broken\n"); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-result-seek.xml +++ phpdoc-it/reference/pgsql/functions/pg-result-seek.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.0 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-result-seek"> <refnamediv> <refname>pg_result_seek</refname> <refpurpose>Set internal row offset in result resource</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_result_seek</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> <function>pg_result_seek</function> set internal row offset in reuslt resource. It returns &false;, if there is error. </para> <para> See also <function>pg_fetch_row</function>, <function>pg_fetch_assoc</function>, <function>pg_fetch_array</function>, <function>pg_fetch_object</function> and <function>pg_fetch_result</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-unescape-bytea.xml +++ phpdoc-it/reference/pgsql/functions/pg-unescape-bytea.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.0 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-unescape-bytea'> <refnamediv> <refname>pg_unescape_bytea</refname> <refpurpose> Escape binary for bytea type </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>pg_unescape_bytea</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> </methodsynopsis> <para> <function>pg_unescape_bytea</function> unescapes string from bytea datatype. It returns unescaped string (binary). </para> <note> <para> When you SELECT bytea type, PostgreSQL returns octal byte value prefixed by \ (e.g. \032). Users are supposed to convert back to binary format 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> </note> <para> See also <function>pg_escape_bytea</function> and <function>pg_escape_string</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: phpdoc-it/reference/pgsql/functions/pg-fetch-assoc.xml +++ phpdoc-it/reference/pgsql/functions/pg-fetch-assoc.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-fetch-assoc"> <refnamediv> <refname>pg_fetch_assoc</refname> <refpurpose>Fetch a row as an array</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_fetch_assoc</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>row</parameter></methodparam> </methodsynopsis> <para> <function>pg_fetch_assoc</function> returns an associative array that corresponds to the fetched row (tuples/records). It returns &false;, if there are no more rows. </para> <para> <function>pg_fetch_assoc</function> is an extended version of <function>pg_fetch_row</function>. In addition to storing the data in the numeric indices (field index) to the result array, it also stores the data in associative indices (field name) by default. </para> <para> <parameter>row</parameter> is row (record) number to be retrieved. First row is 0. </para> <para> <function>pg_fetch_assoc</function> is NOT significantly slower than using <function>pg_fetch_row</function>, while it provides a significant ease of use. </para> <para> See also <function>pg_fetch_row</function>, <function>pg_fetch_array</function>, <function>pg_fetch_assoc</function>, <function>pg_fetch_object</function> and <function>pg_fetch_result</function>. </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query ($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_assoc ($result, 1, PGSQL_ASSOC); echo $arr["author"] . " <- array\n"; ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-get-notify.xml +++ phpdoc-it/reference/pgsql/functions/pg-get-notify.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <refentry id="function.pg-get-notify"> <refnamediv> <refname>pg_get_notify</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_get_notify</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_notify</function> gets notify message sent by <literal>NOTIFY</literal> SQL command. To recieve nofigy messages, <literal>LISTEN</literal> SQL command must be issued. If there is notify message on the connection, array contains message name and backend PID is returned. If there is no message, &false; is returned. </para> <para> See also <function>pg_get_pid</function> </para> <para> <example> <title>PostgreSQL NOTIFY message</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Listen 'author_updated' message from other processes pq_query($conn, 'LISTEN author_updated;'); $notify = pg_get_notify($conn); if (!$notify) print("No messages\n"); else print_r($notify); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-get-pid.xml +++ phpdoc-it/reference/pgsql/functions/pg-get-pid.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <refentry id="function.pg-get-pid"> <refnamediv> <refname>pg_get_pid</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>int</type><methodname>pg_get_pid</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_get_pid</function> gets backend (database server process) PID. PID is useful to check if <literal>NOTIFY</literal> message is sent from other process or not. </para> <para> See also <function>pg_get_notify</function> </para> <para> <example> <title>PostgreSQL backend PID</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } // Backend process PID. Use PID with pg_get_notify() $pid = pg_get_pid($conn); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-ping.xml +++ phpdoc-it/reference/pgsql/functions/pg-ping.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.1 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-ping"> <refnamediv> <refname>pg_ping</refname> <refpurpose>Ping database connection</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_ping</methodname> <methodparam><type>resource</type><parameter>connection</parameter></methodparam> </methodsynopsis> <para> <function>pg_ping</function> ping database connection, try to reconnect if it is broken. It returns &true; if connection is alive, otherwise &false;. </para> <para> See also <function>pg_connection_status</function> and <function>pg_connection_reset</function>. </para> <para> <example> <title>PostgreSQL fetch array</title> <programlisting role="php"> <![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } if (!pg_ping($conn)) die("Connection is broken\n"); ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-result-seek.xml +++ phpdoc-it/reference/pgsql/functions/pg-result-seek.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.0 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 --> <refentry id="function.pg-result-seek"> <refnamediv> <refname>pg_result_seek</refname> <refpurpose>Set internal row offset in result resource</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>array</type><methodname>pg_result_seek</methodname> <methodparam><type>resource</type><parameter>result</parameter></methodparam> <methodparam><type>int</type><parameter>offset</parameter></methodparam> </methodsynopsis> <para> <function>pg_result_seek</function> set internal row offset in reuslt resource. It returns &false;, if there is error. </para> <para> See also <function>pg_fetch_row</function>, <function>pg_fetch_assoc</function>, <function>pg_fetch_array</function>, <function>pg_fetch_object</function> and <function>pg_fetch_result</function>. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: phpdoc-it/reference/pgsql/functions/pg-unescape-bytea.xml +++ phpdoc-it/reference/pgsql/functions/pg-unescape-bytea.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- En-Revision: 1.0 Maintainer: cucinato Status: ready --> <!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 --> <refentry id='function.pg-unescape-bytea'> <refnamediv> <refname>pg_unescape_bytea</refname> <refpurpose> Escape binary for bytea type </refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>pg_unescape_bytea</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> </methodsynopsis> <para> <function>pg_unescape_bytea</function> unescapes string from bytea datatype. It returns unescaped string (binary). </para> <note> <para> When you SELECT bytea type, PostgreSQL returns octal byte value prefixed by \ (e.g. \032). Users are supposed to convert back to binary format 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> </note> <para> See also <function>pg_escape_bytea</function> and <function>pg_escape_string</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->