[Serdev] Singleton pattern
Dariusz Dwornikowski
tdi at vercom.pl
Tue Sep 20 12:51:50 UTC 2005
Andreas Granig wrote:
> Dariusz Dwornikowski wrote:
>
>> Howto implement singleton pattern as module ?
>> Could you point me some example ?
>> I am writing redirection module, and want to have pooling of
>> connections to db in module
>
>
> In mysql module connection pools are already implemented (don't know
> about postgres/oracle).
>
ok.
i want to use pg database. what i need to do to have my own pool of db
connections is :
1) to implement it by myself using libpq-fe.h ?
or
2) to use bind_dbmod() which, as i understand that, will bind me to
fuctions exported by the pg module, which ive got loaded. It seems to
implement something like pools, by allocating memmory.
my feeling tell me that i should use the 2 way
please help me
--
Dariusz 'tdi' Dwornikowski
mailto : tdi at vercom.pl
gg: 2266034
JID : tdi at gentoo.pl
More information about the Serdev
mailing list