RE: [PHP] COPY with PostgreSQL
| From: | Robert Fitzpatrick | Date: | Fri, 22 Oct 2004 21:28:15 +0000 |
| Subject: | RE: [PHP] COPY with PostgreSQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200128@lists.php.net to get a copy of this message | ||
On Fri, 2004-10-22 at 14:55, Jay Blanchard wrote:
> [snip]
> I am using COPY for PostgreSQL and having problems...
> [/snip]
>
> So, is this a PHP problem, or a PostgreSQL problem?
If I took the file it is trying to COPY into PostgreSQL and psql to
bring it in on the server directly, no issues.
Seems to be a PHP problem, at least with the pg libraries. I finally,
after trying many things have gotten this to work with the large files.
I found, if I issue a pg_connection_busy($dbh) before the
pg_put_line(...) in the while statement processing the lines of the temp
file handle, it works. Don't ask me why, that is what I'd like to know.
If I report back if busy is true, I get nothing. Maybe it is just giving
a millisecond to breathe or something while checking to see if the
connection is busy. But with that one line, all is well.
--
Robert