number of loaded/unloaded COPY rows - Mailing list pgsql-hackers

From Volkan YAZICI
Subject number of loaded/unloaded COPY rows
Date
Msg-id 20051212173105.GA556@alamut
Whole thread Raw
Responses Re: number of loaded/unloaded COPY rows
List pgsql-hackers
I prepared a patch for "Have COPY return the number of rows
loaded/unloaded?" TODO. (Sorry for disturbing list with such a simple
topic, but per warning from Bruce Momjian, I send my proposal to -hackers
first.)

I used the "appending related information to commandTag" method which is
used for INSERT/UPDATE/DELETE/FETCH commands too. Furthermore, I edited
libpq to make PQcmdTuples() interpret affected rows from cmdStatus value
for COPY command. (Changes don't cause any compatibility problems for API
and seems like work with triggers too.)

One of the problems related with the used concept is trying to encapsulate
processed number of rows within an uint32 variable. This causes an internal
limit for counting COPY when we think it can process billions of rows. I
couldn't find a solution for this. (Maybe, two uint32 can be used to store
row count.) But other processed row counters (like INSERT/UPDATE) uses
uint32 too.

What's your suggestions and comments?


Regards.

Attachment

pgsql-hackers by date:

Previous
From: Qingqing Zhou
Date:
Subject: Re: Which qsort is used
Next
From: "Pavel Stehule"
Date:
Subject: space for optimalization: DISTINCT without index