Thread: Win32 libpq and ecpg thread safety
Hi, Is there a paragraph in the document talking about this? I've tried to look into it, but can't find it. Can anybody point me to it? Thanks, Qingqing
Qingqing Zhou wrote: > Hi, > > Is there a paragraph in the document talking about this? I've tried to look > into it, but can't find it. Can anybody point me to it? Well, libpq has a section: http://candle.pha.pa.us/main/writings/pgsql/sgml/libpq-threading.html I don't see a thread section for ecpg, but I see several mentions of threading in ecpg.sgml. If you are asking about Win32-specific threading, there is no documentation about it because it works just like Unix threading. At least, that is what I am told. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Wed, 26 Oct 2005, Bruce Momjian wrote: > > If you are asking about Win32-specific threading, there is no > documentation about it because it works just like Unix threading. At > least, that is what I am told. > So both libpq and ecpg are thread-safe in Win32? I look into the code, seems at least ecpg is not, and there is some possible improvements of libpq (esp. PTHREAD_MUTEX_INITIALIZER). Regards, Qingqing
Qingqing Zhou wrote: > > > > On Wed, 26 Oct 2005, Bruce Momjian wrote: > > > > If you are asking about Win32-specific threading, there is no > > documentation about it because it works just like Unix threading. At > > least, that is what I am told. > > > > So both libpq and ecpg are thread-safe in Win32? I look into the code, > seems at least ecpg is not, and there is some possible improvements of > libpq (esp. PTHREAD_MUTEX_INITIALIZER). As far as I know, both are thread safe, except you have to read the documention limitations for both of them. If you have improvements, we would love to see them. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073