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.
2 parents b4c200f + 9af6882 commit 202a099Copy full SHA for 202a099
ext/pgsql/tests/06copy_2.phpt
@@ -0,0 +1,34 @@
1
+--TEST--
2
+PostgreSQL copy functions, part 2
3
+--EXTENSIONS--
4
+pgsql
5
+--SKIPIF--
6
+<?php include("skipif.inc"); ?>
7
+--FILE--
8
+<?php
9
+
10
+include('config.inc');
11
12
+$db = pg_connect($conn_str);
13
14
+pg_query($db, 'CREATE TABLE test_copy (x int)');
15
16
+pg_query($db, 'COPY test_copy FROM STDIN');
17
18
+pg_put_line($db, "1\n");
19
+pg_put_line($db, "\\N\n");
20
+pg_put_line($db, "\\.\n");
21
+pg_end_copy($db);
22
23
+var_dump(pg_fetch_all_columns(pg_query($db, 'SELECT * FROM test_copy ORDER BY 1')));
24
25
+pg_query($db, 'DROP TABLE test_copy');
26
27
+?>
28
+--EXPECT--
29
+array(2) {
30
+ [0]=>
31
+ string(1) "1"
32
+ [1]=>
33
+ NULL
34
+}
0 commit comments