libpgtcl COPY out problem - why PQgetlineAsync() ?

From: ljb <lbayuk(at)mindspring(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpgtcl COPY out problem - why PQgetlineAsync() ?
Date: 2003-04-01 00:51:14
Message-ID: b6anq2$1vkr$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

While working to get Pgaccess up with my pure-Tcl interface (pgin.tcl,
available on gborg), I found that COPY TO STDOUT is not working with
libpgtcl. Or, it is working so slowly it might as well not work. Or, it
works for small data sets but fails for large ones. This happens with both
the bundled PostgreSQL-7.3.2 libpgtcl and the beta libpgtcl on gborg. For
example, with Pgaccess, I can import records at about 5,000 per second, but
when I export records it goes at about 20 per second.

It looks to me like the problem is in PgInputProc() which reads from the
PostgreSQL connection during COPY TO STDOUT. Why is this doing non-blocking
reads using PQgetlineAsync()? If there isn't a complete line of data
available from the backend, this will return 0, which Tcl will see as EOF
since the channel is in non-blocking mode. Am I missing something?

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-04-01 01:33:27 Re: libpgtcl COPY out problem - why PQgetlineAsync() ?
Previous Message Rudy Lippan 2003-03-31 23:49:02 Re: Release of DBD-pg 1.22