mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
e2b87e6230
(PHP pg_set_error_verbosity) New function to set PostgreSQL error verbosity (PHP pg_copy_from) Use non-deprecated API if it is available (PHP pg_copy_to) Use non-deprecated API if it is available
23 lines
299 B
PHP
23 lines
299 B
PHP
--TEST--
|
|
PostgreSQL copy functions
|
|
--SKIPIF--
|
|
<?php include("skipif.inc"); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
include('config.inc');
|
|
|
|
$db = pg_connect($conn_str);
|
|
|
|
$rows = pg_copy_to($db, $table_name);
|
|
|
|
pg_query($db, "DELETE FROM $table_name");
|
|
|
|
pg_copy_from($db, $table_name, $rows);
|
|
|
|
echo "OK";
|
|
|
|
?>
|
|
--EXPECT--
|
|
OK
|