Edit report at http://bugs.php.net/bug.php?id=51607&edit=1

 ID:               51607
 Updated by:       [email protected]
 Reported by:      cbandy at jbandy dot com
 Summary:          pg_copy_from does not allow schema in the tablename
                   argument
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          PostgreSQL related
 Operating System: Linux
 PHP Version:      5.3.2
-Assigned To:      
+Assigned To:      felipe

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the patch.


Previous Comments:
------------------------------------------------------------------------
[2010-04-20 17:59:03] [email protected]

Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=298223
Log: - Fixed bug #51607 (pg_copy_from does not allow schema in the
tablename argument)
  Patch by: cbandy at jbandy dot com

------------------------------------------------------------------------
[2010-04-20 01:50:10] cbandy at jbandy dot com

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 this bug report at http://bugs.php.net/bug.php?id=51607&edit=1

Reply via email to