On Fri, Nov 10, 2006 at 12:23:19AM -0800, Adam wrote:
> Hi,
> 
> I'm porting an embedded-SQL application to PostgreSQL so embedded sql
> is a must for me. My application is multi-threaded. SQL queries are
> used by several threads. The program keeps terminating unexpectedly in
> deemingly "innocent" places.

Note, you might be able to make ECPG and libpq thread-safe, however
even then you *cannot* use the same connection simultaneously from
different threads. You will have to open a new connection for each
parallel connection you want to handle. Or use locking.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to