Skip site navigation (1) Skip section navigation (2)

Re: Anyone have example C code for Asynchronous Command Processing?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: reina_ga(at)hotmail(dot)com (Tony Reina)
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Anyone have example C code for Asynchronous Command Processing?
Date: 2004-03-08 15:51:00
Message-ID: 4165.1078761060@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
reina_ga(at)hotmail(dot)com (Tony Reina) writes:
> I'm using libpq to dump some text files into a PostgreSQL database.
> It's just a bunch of "INSERT INTO" calls, but they block one another
> waiting for the INSERT command to return. I think I can speed things
> up by using asynchronous command processing (e.g. PQsendQuery,
> PQgetResult).

No you can't, because you can't have multiple commands pending over a
single connection.

You would get significantly more speedup by using COPY, anyway.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Marcus Andree S. MagalhaesDate: 2004-03-08 15:59:27
Subject: Re: Anyone have example C code for Asynchronous Command Processing?
Previous:From: Tom LaneDate: 2004-03-08 15:12:26
Subject: Re: dowloading source

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group