Download src/php/php-src/ext/pgsql/tests/06copy.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/06copy.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pgsql/tests/06copy.phpt
-
curl -L -o 06copy.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/06copy.phpt
593 Bytes
| --TEST-- | |
| PostgreSQL copy functions | |
| --EXTENSIONS-- | |
| pgsql | |
| --SKIPIF-- | |
| include("inc/skipif.inc"); | |
| --FILE-- | |
| include('inc/config.inc'); | |
| $table_name = "table_06copy"; | |
| $db = pg_connect($conn_str); | |
| pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); | |
| $rows = pg_copy_to($db, $table_name); | |
| pg_query($db, "DELETE FROM $table_name"); | |
| pg_copy_from($db, $table_name, $rows); | |
| echo "OK"; | |
| --CLEAN-- | |
| include('inc/config.inc'); | |
| $table_name = "table_06copy"; | |
| $db = pg_connect($conn_str); | |
| pg_query($db, "DROP TABLE IF EXISTS {$table_name}"); | |
| --EXPECT-- | |
| OK | |