From klm@python.org Tue Oct 21 19:50:04 1997 From: klm@python.org (Ken Manheimer) Date: Tue, 21 Oct 1997 14:50:04 -0400 (EDT) Subject: [DB-SIG] New mysqldb module 0.1 In-Reply-To: <19970929232557.47238@fga.de> Message-ID: n Mon, 29 Sep 1997, Oliver Andrich wrote: > as I promised, I like to announce the first beta release of my new, DB-SIG API > conforming mysqldb module for Python. I hope that the attachment of the modules > source code doesn't violate the policy for posting articles on this list. > Sadly, I haven't found a home in WWW yet. ;-) > > The attached tar-ball includes mysqldb.c (the module) and a README file, that > describes the module. Oliver, posting the package is fine, as far as i know, particularly since it isn't very big. Anyway, i've taken the liberty to put a copy on the python.org ftp site - see ftp://ftp.python.org/pub/python/contrib/Database/mysqlapi.tar.gz (and also mysqlapi.README - i added your name and email addr to the top of the mysqlapi.README, but not to the one inside the tarball - you should include that information in your readme's, so users know how to get in touch with you.) Please let us know when you have a full release - consider depositing it at the contrib site. And thanks much for making it available - i'm not sure about the database merits and drawbacks, but i suspect there is a number of people who can benefit from a DB-SIG standard interface to a free db... Ken Manheimer klm@cnri.reston.va.us 703 620-8990 x268 (orporation for National Research |nitiatives # Thanks for joining the PSA! # # http://www.python.org/psa/ # _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From hannu@trust.ee Wed Oct 22 10:15:02 1997 From: hannu@trust.ee (Hannu Krosing) Date: Wed, 22 Oct 1997 12:15:02 +0300 Subject: [DB-SIG] general DB API specs, where? Message-ID: <344DC416.54F306DD@sid.trust.ee> Hi, I have written a pure python implementation on PostgreSQL driver, I would like to make it somewaht standard compliant (for now it has an interface similar to the C module pg95). So wher can I get the 'standard' db api spec? Hannu _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From jim@digicool.com Wed Oct 22 11:44:23 1997 From: jim@digicool.com (Jim Fulton) Date: Wed, 22 Oct 1997 06:44:23 -0400 Subject: [DB-SIG] general DB API specs, where? References: <344DC416.54F306DD@sid.trust.ee> Message-ID: <344DD907.3010@digicool.com> Hannu Krosing wrote: > > Hi, > > I have written a pure python implementation on PostgreSQL driver, > I would like to make it somewaht standard compliant (for now it has > an interface similar to the C module pg95). > > So wher can I get the 'standard' db api spec? http://www.python.org/sigs/db-sig/DatabaseAPI.html Jim _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From andrich@fga.de Sat Oct 25 14:43:47 1997 From: andrich@fga.de (Oliver Andrich) Date: Sat, 25 Oct 1997 15:43:47 +0200 Subject: [DB-SIG] PostgreSQL Message-ID: <19971025154347.25069@fga.de> Hi, does there exist an DB API compliant interface to PostgreSQL? Does the "old" PyGres module work with current versions of Python and PostgreSQL? Or do I have to develop one? Best regards, Oliver P.S.: Forget about my mysqldb module. Joe Skinner has developed a DB API complient wrapper to his module and I don't like to deal with this database anymore and its developers, too. -- --------------------------------------------------------------------- FGA Furch & Graf intermediaservices gbr andrich@fga.de Gartenstr. 5 http://www.fga.de D-56220 Sankt Sebastian +49-261-98244-94 (voice) -95 (fax) --------------------------------------------------------------------- _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From hannu@trust.ee Mon Oct 27 07:51:25 1997 From: hannu@trust.ee (Hannu Krosing) Date: Mon, 27 Oct 1997 09:51:25 +0200 Subject: [DB-SIG] PostgreSQL References: <19971025154347.25069@fga.de> Message-ID: <345447FD.638E3461@sid.trust.ee> Oliver Andrich wrote: > Hi, > > does there exist an DB API compliant interface to PostgreSQL? Does the "old" > PyGres module work with current versions of Python and PostgreSQL? Or do I > have to develop one? Just relink (and maybe a recompile of pg95module.c, I am not sure) with new libpq.If you need to get the oid of last inserted tuple I have a patch thad adds a function oidstaus (that returns either the oid or None if last command was not an insert of single tuple). If you need a pure python implementation (a little slower at startup, but usable also from under windows and probably a mac) , i have one that works for basic things (i.e no large objects or direct backend functions calls) I hope to bring it in compliance with DB API by the end of this week and then announce it here and on postgres developer list. Hannu _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From gstein@exchange.microsoft.com Thu Oct 30 00:15:28 1997 From: gstein@exchange.microsoft.com (Greg Stein (Exchange)) Date: Wed, 29 Oct 1997 16:15:28 -0800 Subject: [DB-SIG] RE: Database API -- description attribute Message-ID: <69D8143E230DD111B1D40000F848584038C857@ED> Being the person that actually wrote that line :-) ... Terry's suggestion is the "right" way to phrase it. Note: the temporal phrasing was used in reference to fetching the attribute, not the operation that had occurred in the past (via execute()). The DB SIG is now responsible for the maintainence of the specification. I'm not sure who specifically. It is due for updating primarily w.r.t the DBI module. -g -----Original Message----- From: tjreedy@udel.edu [SMTP:tjreedy@udel.edu] Sent: Wednesday, October 29, 1997 10:39 AM To: python-list@cwi.nl Subject: Re: Database API -- description attribute In article <635hic$bq1@clarknet.clark.net>, culliton@clark.net says... >In article , >Roy Smith wrote: >>The problem is that the API doc says "This attribute will be None for >>operations that do not return rows...". >>Is the API documentation just misleading? >You are either reading too much into the documentation or just being >damned silly. The intent is that if you do a select or similar type >of command which returns zero or more records you will get a >description of that view. ... >Obviously common sense just isn't as common as it ought to be. I'm tempted to say something like "Obviously curtesy just isn't as common as it ought to be." but let us go on. The confusion is between 'operations' as concrete specific actions (instances) and 'operations' as abstract generic classes of actions, and whether 'do not return rows' is an attribute of the former or the latter. Roy appears to have been reading with the first meaning (which is not really so silly, given the use of the temporal 'will be' instead of the timeless 'is') while 'the intent' is that people read with the second. There is another possible explanation for the confusion. Since the arrival of 0 and its associated concept in Europe, there has been a long-standing philosophical/mathematical argument over whether 0 'counts' as a number of rows, or of anything else. I say 'yes', or 'it should', or 'this is the abstraction-insight that separates modern from classical arithmetic and mathematics'. But I must acknowledge that most commoners and some mathematicians regard '1' as the first natural number, instead of the second. (Check out your keyboard or telephone keypad.) As indicated by its 0-based indexing, Python (like C) implicitly adopts the modern position that counts begin with 0, not 1, and so it is reasonable that its documents assume this as background information. But if Roy does not (or did not before) see 0 as a "number of rows", he unfortunately has lots of company. Perhaps clearer and less ambiguous would be "This attribute is None for types of operations that never return rows." Terry J. Reedy _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From gstein@exchange.microsoft.com Thu Oct 30 00:18:05 1997 From: gstein@exchange.microsoft.com (Greg Stein (Exchange)) Date: Wed, 29 Oct 1997 16:18:05 -0800 Subject: [DB-SIG] RE: oracle and python Message-ID: <69D8143E230DD111B1D40000F848584038C858@ED> You accidentally clipped the line that said: foo = [ 47 ] (i.e. it was a sequence) -g -----Original Message----- From: roy@popmail.med.nyu.edu [SMTP:roy@popmail.med.nyu.edu] Sent: Wednesday, October 29, 1997 8:32 AM To: python-list@cwi.nl Subject: Re: oracle and python Jefu! wrote: > cur.execute("begin testprocs.t1(:1) ; end ; ", foo ) ; > > OracleDbError: EXECUTE caused a ORA-01008: not all variables bound I make this mistake all the time! The 2nd argument to execute() has to be a sequence, i.e. a tuple or list. That's why it can't bind the variables. Of course, it would be even better if the oracledb module itself checked and returned a somewhat more useful error message :-) You want: cur.execute("begin testprocs.t1(:1) ; end ; ", [foo] ) The other variation on this which always catches me is that you can't just do "(foo)" to turn it into a tuple. You need to do "(foo,)". This is way ugly, so I just do "[foo]". -- Roy Smith New York University School of Medicine 550 First Avenue, New York, NY 10016 _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From mclay@nist.gov Thu Oct 30 14:03:24 1997 From: mclay@nist.gov (Michael McLay) Date: Thu, 30 Oct 1997 09:03:24 -0500 Subject: [DB-SIG] RE: Database API -- description attribute In-Reply-To: <69D8143E230DD111B1D40000F848584038C857@ED> References: <69D8143E230DD111B1D40000F848584038C857@ED> Message-ID: <199710301403.JAA18279@fermi.eeel.nist.gov> Greg Stein writes: > Being the person that actually wrote that line :-) ... Terry's > suggestion is the "right" way to phrase it. > > Note: the temporal phrasing was used in reference to fetching the > attribute, not the operation that had occurred in the past (via > execute()). > > The DB SIG is now responsible for the maintainence of the specification. > I'm not sure who specifically. It is due for updating primarily w.r.t > the DBI module. I can update the documents. I would prefer getting an edited version of the existing HTML document mailed to me. Short of that please propose a corrrections/clarifications to the existing wording at specific locations in the specificaiton. Michael _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________ From Anthony Baxter Fri Oct 31 06:57:52 1997 From: Anthony Baxter (Anthony Baxter) Date: Fri, 31 Oct 1997 17:57:52 +1100 Subject: [DB-SIG] oracle and python and db-sig API, oh my! Message-ID: <199710310657.RAA20215@jambu.off.connect.com.au> Ok dokey, time for some fun questions. DBI: Is there a standard DBI module out there? I have my own one as part of the OracleDB interface. It makes sense to have just one of them, no? I'd like a bit more consistency in the current (rather feature-poor :) interface - it should be possible to use the type code from the description attribute as a argument to a method for building an arbitrary type. I'd also like better date support - did anything come out of the long discussion earlier in the year about this stuff? Oracle stored procedures: I'm attacking the stored procedures and variable binding problem - it's still not clear to me how, or why, it's failing. Once I have a solution, a beta test of oracledb will go onto my web pages. (yay) API: changes I'd like to see (some of these were posted to the list earlier this year). note that connection.close() nukes cursors associated with the connection. a more thorough DBI description. Maybe some examples? _______________ DB-SIG - SIG on Tabular Databases in Python send messages to: db-sig@python.org administrivia to: db-sig-request@python.org _______________