We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a19f655 commit be36bf5Copy full SHA for be36bf5
ext/pgsql/tests/06copy_2.phpt
@@ -0,0 +1,32 @@
1
+--TEST--
2
+PostgreSQL copy functions, part 2
3
+--SKIPIF--
4
+<?php include("skipif.inc"); ?>
5
+--FILE--
6
+<?php
7
+
8
+include('config.inc');
9
10
+$db = pg_connect($conn_str);
11
12
+pg_query($db, 'CREATE TABLE test_copy (x int)');
13
14
+pg_query($db, 'COPY test_copy FROM STDIN');
15
16
+pg_put_line($db, "1\n");
17
+pg_put_line($db, "\\N\n");
18
+pg_put_line($db, "\\.\n");
19
+pg_end_copy($db);
20
21
+var_dump(pg_fetch_all_columns(pg_query($db, 'SELECT * FROM test_copy ORDER BY 1')));
22
23
+pg_query($db, 'DROP TABLE test_copy');
24
25
+?>
26
+--EXPECT--
27
+array(2) {
28
+ [0]=>
29
+ string(1) "1"
30
+ [1]=>
31
+ NULL
32
+}
0 commit comments