Re: [HACKERS] ECPG, threading and pooling

2003-01-28 Thread Michael Meskes
On Mon, Jan 27, 2003 at 10:26:53AM -0500, Tom Lane wrote: > The preproc code doesn't need to be thread-safe does it? You're right of cause. Michael -- Michael Meskes Email: [EMAIL PROTECTED] ICQ: 179140304 Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL! ---

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Tom Lane
Michael Meskes <[EMAIL PROTECTED]> writes: >> Keep the thread hacking on the client side, please. Isn't there one of >> the ecpg/include/ files that would be suitable? > Yes, there is. Better make that there are. There is a file called > extern.h both in preproc as well as in lib and each file in

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Michael Meskes
On Mon, Jan 27, 2003 at 09:30:50AM -0500, Tom Lane wrote: > Michael Meskes <[EMAIL PROTECTED]> writes: > > - Is it neccessary to patch c.h for ecpg? > > If you commit that part, it will be reverted forthwith (especially the > hardwired #define HAVE_PTHREAD_H ;-)). > > Keep the thread hacking on t

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Michael Meskes
On Mon, Jan 27, 2003 at 02:06:26PM +, Lee Kindness wrote: > > - Not sure with the version numbering but I can fix that later. > > As discussed on pgsql-hackers after the 7.3 release any "binary > incompatible" library change needs a major version number increase. Sorry, I was not precise eno

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Tom Lane
Michael Meskes <[EMAIL PROTECTED]> writes: > - Is it neccessary to patch c.h for ecpg? If you commit that part, it will be reverted forthwith (especially the hardwired #define HAVE_PTHREAD_H ;-)). Keep the thread hacking on the client side, please. Isn't there one of the ecpg/include/ files that

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Lee Kindness
Shridhar Daithankar writes: > On 27 Jan 2003 at 14:06, Lee Kindness wrote: > > Michael Meskes writes: > > > Thanks a lot. I have no experience in multithreaded software development > > > so I cannot completely check your patch but it surely looks good. Shall > > > I commit it, or will you?

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Shridhar Daithankar
On 27 Jan 2003 at 14:06, Lee Kindness wrote: > Michael Meskes writes: > > On Mon, Jan 27, 2003 at 11:52:18AM +, Lee Kindness wrote: > > > I've spent a bit of time on making ecpg thread safe over Christmas, > > > while it's not finished i'm sure the attached patch is at least useful > > > a

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Lee Kindness
Michael Meskes writes: > On Mon, Jan 27, 2003 at 11:52:18AM +, Lee Kindness wrote: > > I've spent a bit of time on making ecpg thread safe over Christmas, > > while it's not finished i'm sure the attached patch is at least useful > > and a step in the right direction. > Thanks a lot. I hav

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Michael Meskes
On Mon, Jan 27, 2003 at 11:52:18AM +, Lee Kindness wrote: Content-Description: message body text > Michael, > ... > I've spent a bit of time on making ecpg thread safe over Christmas, > while it's not finished i'm sure the attached patch is at least useful > and a step in the right direction.

Re: [HACKERS] ECPG, threading and pooling

2003-01-27 Thread Lee Kindness
Michael, Michael Meskes writes: > On Thu, Jan 23, 2003 at 02:40:33PM +0530, Shridhar >Daithankar<[EMAIL PROTECTED]> wrote: > > I would like to use ECPG as it is relatively easy to code. However my > > application is multithreaded and also uses connecion pools. > > I'm afraid it needs some

Re: [HACKERS] ECPG, threading and pooling

2003-01-23 Thread Michael Meskes
On Thu, Jan 23, 2003 at 08:58:24PM +0530, Shridhar Daithankar wrote: > Well, when using libpq, I create a pool of PGconn*. What pool I create with > ecpg? Looking at ecpglib.h, it seems that I need to create a pool of char * Yes. You use it as EXEC SQL AT :connection_var SELECT ... > That is cor

Re: [HACKERS] ECPG, threading and pooling

2003-01-23 Thread Shridhar Daithankar
On Thursday 23 January 2003 08:40 pm, you wrote: > On Thu, Jan 23, 2003 at 02:40:33PM +0530, Shridhar Daithankar<[EMAIL PROTECTED]> wrote: > > I would like to know if ECPG is thread safe and I can use an arbitrary > > PGconn* object pulled from a connection pool. > Not sure what you mean with this

Re: [HACKERS] ECPG, threading and pooling

2003-01-23 Thread Michael Meskes
On Thu, Jan 23, 2003 at 02:40:33PM +0530, Shridhar Daithankar<[EMAIL PROTECTED]> wrote: > I would like to use ECPG as it is relatively easy to code. However my > application is multithreaded and also uses connecion pools. I'm afraid it needs some work to be thread-safe. sqlca is defined statical

[HACKERS] ECPG, threading and pooling

2003-01-23 Thread Shridhar Daithankar<[EMAIL PROTECTED]>
Hi all, I would like to use ECPG as it is relatively easy to code. However my application is multithreaded and also uses connecion pools. I would like to know if ECPG is thread safe and I can use an arbitrary PGconn* object pulled from a connection pool. Do I need to use connection name? I mea