2002-04-08 01:37:38 +00:00
|
|
|
--TEST--
|
|
|
|
PostgreSQL pg_convert()
|
|
|
|
--SKIPIF--
|
2009-12-25 20:56:00 +00:00
|
|
|
<?php
|
|
|
|
include("skipif.inc");
|
2013-06-19 09:46:11 +00:00
|
|
|
skip_bytea_not_escape();
|
2009-12-25 20:56:00 +00:00
|
|
|
?>
|
2002-04-08 01:37:38 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2003-05-20 00:14:46 +00:00
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
|
|
include 'config.inc';
|
|
|
|
|
|
|
|
$db = pg_connect($conn_str);
|
|
|
|
|
|
|
|
$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
|
|
|
|
$converted = pg_convert($db, $table_name, $fields);
|
|
|
|
|
|
|
|
var_dump($converted);
|
2002-04-08 01:37:38 +00:00
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
array(3) {
|
2013-08-05 09:23:15 +00:00
|
|
|
[""num""]=>
|
2002-04-19 12:24:58 +00:00
|
|
|
string(4) "1234"
|
2013-08-05 09:23:15 +00:00
|
|
|
[""str""]=>
|
|
|
|
string(6) "E'AAA'"
|
|
|
|
[""bin""]=>
|
|
|
|
string(6) "E'BBB'"
|
|
|
|
}
|