On Friday 22 September 2006 10:06, Christoph Zwerschke wrote: > Sean Davis wrote: > > That is good to know. Without testing it, does that mean that a > > db._pgdbCns__cnx is a pg connection object, or is it something else > > altogether? > > Yes, it's a pg connection object. Both pg and pgdb resort to the same > underlying _pg module actually providing these connection objects. > > > Thanks for the hint. I'm relatively new to python and pygresql, after > > coming from perl. Is there a place where the _pgdbCns__cnx is > > documented, or is it just a question of looking at the source? > > No, this is an undocumented feature. Actually it is a private attribute, > so it seems D'Arcy wanted to discourage using it, probably because mixed > use of both interfaces may lead to problems. The official way would be > to open a separate connection using the pg module. > > However, I don't see a problem using the inserttable method that way. > Should we consider a semi-official method of accessing the underlying > _pg connection or even taking over all or some of its methods to the > pgdb connection? D'Arcy, what do you think?
Thanks Christoph, for clarifying. It seems to me that access to the pg-api methods would be considered an "add-on" feature, which I think the DB-API actually allows. Would it make sense to make the non-redundant subset of the pg-api methods (those not included in the DB-API such as the database introspection methods and the socket connection methods) available via a public interface? Sean _______________________________________________ PyGreSQL mailing list [email protected] http://mailman.vex.net/mailman/listinfo/pygresql
