El Vie 22 Oct 2004 03:18, Robert Fitzpatrick escribi�:
> I am using COPY for PostgreSQL and having problems now that the incoming
> file contains more than approx 1500 lines. Is this an issue anyone is aware
> of? Lot's of files over 1000 lines have worked fine, but after getting a
> file over 1800 I began having problems. I have broke the file down to a
> approx. 1500 line that works sometimes and not others. Here is a snippet of
> what I'm trying to do:
>
> $result = pg_exec($dbh, "COPY tblxrf FROM stdin USING DELIMITERS ','");
> fseek($temp_fh,0); // go to beginning of temp file
> while (($csv_line = fgets($temp_fh,1024))) {
> pg_put_line($dbh, $csv_line);
> }
> $stat = pg_put_line($dbh, "\\.\n"); // notify db finished or report error
> if (!$stat) { echo "ERROR: An error has occurred while putting last line
> of copy data<br>\n"; exit; } $stat = pg_end_copy($dbh); // post (sync data)
> or report error
>
> The process just hangs with the large number of lines, I have to kill the
> COPY process for postgresql on the server before trying again.
Logs, if any?
What does PostgreSQL say in the logs? Does PHP spit something in the logs?
--
16:10:01 up 40 days, 6:28, 3 users, load average: 1.01, 0.53, 0.53
-----------------------------------------------------------------
Mart�n Marqu�s | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica | DBA, Programador, Administrador
Universidad Nacional
del Litoral
-----------------------------------------------------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php