summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests/12pg_insert_9.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/tests/12pg_insert_9.phpt')
-rw-r--r--ext/pgsql/tests/12pg_insert_9.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/pgsql/tests/12pg_insert_9.phpt b/ext/pgsql/tests/12pg_insert_9.phpt
new file mode 100644
index 000000000..329364ad6
--- /dev/null
+++ b/ext/pgsql/tests/12pg_insert_9.phpt
@@ -0,0 +1,26 @@
+--TEST--
+PostgreSQL pg_insert() (9.0+)
+--SKIPIF--
+<?php
+include("skipif.inc");
+skip_bytea_not_hex();
+?>
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+include 'config.inc';
+
+$db = pg_connect($conn_str);
+pg_query($db, "SET standard_conforming_strings = 0");
+
+$fields = array('num'=>'1234', 'str'=>'AAA', 'bin'=>'BBB');
+
+pg_insert($db, $table_name, $fields) or print "Error in test 1\n";
+echo pg_insert($db, $table_name, $fields, PGSQL_DML_STRING)."\n";
+
+echo "Ok\n";
+?>
+--EXPECT--
+INSERT INTO "php_pgsql_test" ("num","str","bin") VALUES (1234,E'AAA',E'\\x424242');
+Ok \ No newline at end of file