1--TEST-- 2PostgreSQL pg_convert() (8.5+) 3--SKIPIF-- 4<?php 5include("skipif.inc"); 6skip_server_version('8.5dev', '<'); 7?> 8--FILE-- 9<?php 10error_reporting(E_ALL); 11 12include 'config.inc'; 13 14$db = pg_connect($conn_str); 15pg_query($db, "SET standard_conforming_strings = 0"); 16 17$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB'); 18$converted = pg_convert($db, $table_name, $fields); 19 20var_dump($converted); 21?> 22--EXPECT-- 23array(3) { 24 ["num"]=> 25 string(4) "1234" 26 ["str"]=> 27 string(5) "'AAA'" 28 ["bin"]=> 29 string(11) "'\\x424242'" 30} 31