Re: ECPG, threading and pooling

From: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ECPG, threading and pooling
Date: 2003-01-23 15:28:24
Message-ID: 200301232058.24886.shridhar_daithankar@persistent.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thursday 23 January 2003 08:40 pm, you wrote:
> On Thu, Jan 23, 2003 at 02:40:33PM +0530, Shridhar
Daithankar<shridhar_daithankar(at)persistent(dot)co(dot)in> 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?

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 *

> > Do I need to use connection name? I mean how do I store connection name
> > in an array or so?
> How else would you decide against whcih connection to run the statement?

That is correct but I did not find any example of how to use a particular
connection in an SQL statement. It would be a fairly trivial guess that the
connection name is one of the arguments to ECPGdo. But how the SQL statement
look like, I don't have a clue. Also I don't know know how to use ECPGsetconn
to set a connection. No documentation on that.

I can guess that ECPG maintains a mapping between connection name and PGconn*
object for a user. If possible it would be very helpful to form a ecpg
connection on top a user supplied PGconn* object.

I just downloaded 7.3.1 to take a look at. I hope to make a contribution if
possible.

Shridhar

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2003-01-23 15:28:30 Re: Options for growth
Previous Message Steve Wampler 2003-01-23 15:12:10 Re: Threads

Browse pgsql-patches by date

  From Date Subject
Next Message Andy Kriger 2003-01-23 17:07:31 question about rollback and SQLException
Previous Message Michael Meskes 2003-01-23 15:10:09 Re: ECPG, threading and pooling