Bug #51607 [NEW]: pg_copy_from does not allow schema in the tablename argument

From: Date: Mon, 19 Apr 2010 23:50:10 +0000
Subject: Bug #51607 [NEW]: pg_copy_from does not allow schema in the tablename argument
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149709@lists.php.net to get a copy of this message
From:             
Operating system: Linux
PHP version:      5.3.2
Package:          PostgreSQL related
Bug Type:         Bug
Bug description:pg_copy_from does not allow schema in the tablename argument

Description:
------------
It is not possible to include the schema when passing a table name to
pg_copy_from, e.g. pg_copy_from($conn, "schema.tablename", $rows).

r291312 addressed this issue for pg_copy_to, though the attached patch
seems simpler.

Test script:
---------------
// setup
pg_query($db, 'CREATE SCHEMA temp_test_schema');
pg_query($db, 'CREATE TABLE temp_test_schema.temp_test_table (a INT)');

// test
pg_copy_from($db, 'temp_test_schema.temp_test_table', array('1'));

// cleanup
pg_query($db, 'DROP SCHEMA temp_test_schema CASCADE');

Expected result:
----------------
The row is copied without error

Actual result:
--------------
pg_copy_from() : Copy command failed: ERROR: relation
"temp_test_schema.temp_test_table" does not exist

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51607&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51607&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51607&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51607&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51607&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51607&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51607&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51607&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51607&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51607&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51607&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51607&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51607&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51607&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51607&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51607&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51607&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51607&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51607&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51607&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51607&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51607&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#149709) next »