|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50195 pg_copy_to does not allow schema in the tablename argument
Submitted: 2009-11-16 21:37 UTC Modified: 2009-11-25 14:29 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: eddie at eddiemonge dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 5.2.11 OS: Linux
Private report: No CVE-ID: None
 [2009-11-16 21:37 UTC] eddie at eddiemonge dot com
When trying to use pg_copy_to on a schema other than public, the tablename argument should allow the schema to be passed in, i.e. pg_copy_to($conn, "schema.tablename").

Reproduce code:
From manual page:
$tablename = "mwa.newprojects";

$rows = pg_copy_to($db, $tablename);

Expected result:
Return the contents of the table into a formatted array

Actual result:
FAILED ERROR:  relation "mwa.newprojects" does not exist


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-25 14:28 UTC]
Automatic comment from SVN on behalf of iliaa
Log: Fixed bug #50195 (pg_copy_to() fails when table name contains schema).
 [2009-11-25 14:29 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:25 2019 UTC