Download src/php/php-src/ext/pgsql/tests/11pg_meta_data.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.33 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/11pg_meta_data.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pgsql/tests/11pg_meta_data.phpt
-
curl -L -o 11pg_meta_data.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pgsql/tests/11pg_meta_data.phpt
1.33 kB
| --TEST-- | |
| PostgreSQL pg_metadata() | |
| --EXTENSIONS-- | |
| pgsql | |
| --SKIPIF-- | |
| include("inc/skipif.inc"); | |
| --FILE-- | |
| error_reporting(E_ALL); | |
| include 'inc/config.inc'; | |
| $table_name = "table_11pg_meta_data"; | |
| $db = pg_connect($conn_str); | |
| pg_query($db, "CREATE TABLE {$table_name} (num int, str text, bin bytea)"); | |
| $meta = pg_meta_data($db, $table_name); | |
| var_dump($meta); | |
| --CLEAN-- | |
| include('inc/config.inc'); | |
| $table_name = "table_11pg_meta_data"; | |
| $db = pg_connect($conn_str); | |
| pg_query($db, "DROP TABLE IF EXISTS {$table_name}"); | |
| --EXPECT-- | |
| array(3) { | |
| ["num"]=> | |
| array(7) { | |
| ["num"]=> | |
| int(1) | |
| ["type"]=> | |
| string(4) "int4" | |
| ["len"]=> | |
| int(4) | |
| ["not null"]=> | |
| bool(false) | |
| ["has default"]=> | |
| bool(false) | |
| ["array dims"]=> | |
| int(0) | |
| ["is enum"]=> | |
| bool(false) | |
| } | |
| ["str"]=> | |
| array(7) { | |
| ["num"]=> | |
| int(2) | |
| ["type"]=> | |
| string(4) "text" | |
| ["len"]=> | |
| int(-1) | |
| ["not null"]=> | |
| bool(false) | |
| ["has default"]=> | |
| bool(false) | |
| ["array dims"]=> | |
| int(0) | |
| ["is enum"]=> | |
| bool(false) | |
| } | |
| ["bin"]=> | |
| array(7) { | |
| ["num"]=> | |
| int(3) | |
| ["type"]=> | |
| string(5) "bytea" | |
| ["len"]=> | |
| int(-1) | |
| ["not null"]=> | |
| bool(false) | |
| ["has default"]=> | |
| bool(false) | |
| ["array dims"]=> | |
| int(0) | |
| ["is enum"]=> | |
| bool(false) | |
| } | |
| } | |