From john@totten.com Fri Oct 2 08:00:58 1998 From: john@totten.com (John Totten) Date: Thu, 01 Oct 1998 23:00:58 -0800 Subject: [DB-SIG] MetaKit Message-ID: <36147A2A.B7040B1@totten.com> This should be of interest to you all. The Python port is new. http://www.equi4.com/metakit/summary.html Make sure you look at the performance of http://www.equi4.com/metakit/xml/ Its a lightening fast way of using indexed access to a tree view such as that held in an xml document architecture. The example xml file is the Bible. John Totten From A.M.INGRALDI@larc.nasa.gov Fri Oct 2 14:22:14 1998 From: A.M.INGRALDI@larc.nasa.gov (Anthony M. Ingraldi) Date: Fri, 2 Oct 1998 09:22:14 -0400 Subject: [DB-SIG] informixdb module problem In-Reply-To: <36147A2A.B7040B1@totten.com> Message-ID: Hello, I am having some difficulty with DATE data and the informixdb module. The following example illustrates the problem >>> cursor.execute("insert into table_name (a_date) values ('10/2/98')") 1 >>> cursor.execute("select a_date from table_name where a_date='10/2/98'") >>> res = cursor.fetchall() >>> res [(,)] >>> str(res[0][0]) 'Wed Dec 31 18:59:59 1969' DbiDate objects are not behaving properly or I'm not using them correctly. In the above example the date field was properly inserted and yet the value returned via the DbiDate object is incorrect. I am using python 1.5.1 with the Release 1.01 of the informixdb module dated 1997-03-11. Running on a Solaris 2.6 system. -- Tony Ingraldi | e-mail: A.M.INGRALDI@LaRC.NASA.GOV NASA Langley Research Center | Mail Stop 267 | Phone : (757) 864-3039 Hampton, VA 23681-2199 | Fax : (757) 864-7892 From johnm@magnet.com Fri Oct 2 15:25:14 1998 From: johnm@magnet.com (John Mitchell) Date: Fri, 2 Oct 1998 10:25:14 -0400 (EDT) Subject: [DB-SIG] informixdb module problem In-Reply-To: Message-ID: On Fri, 2 Oct 1998, Anthony M. Ingraldi wrote: > Hello, > > I am having some difficulty with DATE data and the informixdb module. The > following example illustrates the problem > > >>> cursor.execute("insert into table_name (a_date) values ('10/2/98')") > 1 > >>> cursor.execute("select a_date from table_name where a_date='10/2/98'") > >>> res = cursor.fetchall() > >>> res > [(,)] > >>> str(res[0][0]) > 'Wed Dec 31 18:59:59 1969' I've seen the exact same symptoms: selects returning a DbiDate get the equivalent of "-1"... Workaround: 1) swear till you're blue, and then 2) if you dont need the date *value*, just the *string* (ie: for reports), then change your select to return a string: select a_date||'' from table_name The "||" is Informix's string-concatanate. (I'm using Python 1.5, SGI Irix 6.2, informixdb 1.01 1997-03-11.) Oh yeah: dont try to do load/unload via cursor.execute(). It doesnt work: 'unload' isnt SQL! Check: http://outside.organic.com/mail-archives/dbi-users/Jun1997/0170.html I've only got to step #1 above, because #2 is "add code to the C library"... - j From tukker@microweb.nl Fri Oct 9 20:28:45 1998 From: tukker@microweb.nl (tukker@microweb.nl) Date: Fri, 9 Oct 1998 20:28:45 +0100 (WET DST) Subject: [DB-SIG] Oracle 8 Linux and oracledb Message-ID: <19981009192847Z78879-299+172@microweb.nl> L.S. I managed to compile the oracledb module under linux with Oracle 8. But using python I get the following message: [jit@master oracle]$ python Python 1.5.1 (#1, Oct 9 1998, 19:30:22) [GCC 2.7.2.3] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import oracledb; Traceback (innermost last): File "", line 1, in ? ImportError: /usr/local/lib/python1.5/lib-dynload/oracledbmodule.so: undefined symbol: kpugml >>> What is wrong ??? Greetinx, Klaasjan Tukker Microweb BV -- . ). )/ ) /( / ( \( .. \ )\ .. | | ||-------|| Klaasjan Tukker --+---+--|| || k.tukker@microweb.nl | | || || voice: +31-743494749 (work) --+---+--|| || voice: +31-622451821 (Mobil) | | \\ // ======= #koffie logo by Eric Schol You can check out #koffie anytime you want, but you can never /leave From tukker@microweb.nl Fri Oct 9 20:45:43 1998 From: tukker@microweb.nl (tukker@microweb.nl) Date: Fri, 9 Oct 1998 20:45:43 +0100 (WET DST) Subject: [DB-SIG] Oracle 8 Linux and oracledb In-Reply-To: <19981009192847Z78879-299+172@microweb.nl> from "tukker@microweb.nl" at Oct 9, 98 08:28:45 pm Message-ID: <19981009194549Z78879-299+173@microweb.nl> > I managed to compile the oracledb module under linux with Oracle 8. > > But using python I get the following message: > > [jit@master oracle]$ python > Python 1.5.1 (#1, Oct 9 1998, 19:30:22) [GCC 2.7.2.3] on linux2 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam > >>> import oracledb; > Traceback (innermost last): > File "", line 1, in ? > ImportError: /usr/local/lib/python1.5/lib-dynload/oracledbmodule.so: undefined symbol: kpugml > >>> Oke, I will give the answer myself.. I read on the PHP3 newsgroup a message about Oracle8, Linux and PHP. Some fiddling with libraries gave the following successfull result: the oraclemodule part of the Makefile in the oracledb package: oracledbmodule$(SO): oradbmodule.o dbi.o; $(LDSHARED) oradbmodule.o dbi.o -L/homeb/oracle/lib/ -L/homeb/oracle/rdbms/lib /homeb/oracle/lib/scorept.o -L/homeb/oracle/rdbms/public -lnetv2 -lnttcp -lnetwork -lncr -lvsn -lcommon -lgeneric -lcore4 -lnlsrtl3 -lepc -lsql -lclient -lclntsh -ldl -o oracledbmodule$(SO) The linking of the libraries differs of the results found by the auto-generate script... Greetinx, Klaasjan TUkker From eb@tunes.com Fri Oct 9 21:41:18 1998 From: eb@tunes.com (Erik Bartels) Date: Fri, 9 Oct 1998 13:41:18 -0700 Subject: [DB-SIG] Unable to complete install of informixdb In-Reply-To: Message-ID: <001a01bdf3c5$2ac98a40$63580ece@moose.tunesnetwork.com> > -----Original Message----- > From: Anthony M. Ingraldi [mailto:A.M.INGRALDI@larc.nasa.gov] > Sent: Wednesday, September 23, 1998 5:31 AM > To: eb@tunes.com > Subject: RE: [DB-SIG] Unable to complete install of informixdb > > > > > >LIBDIRS= -L${INFORMIXDIR}/lib -L${INFORMIXDIR}/lib/esql > -R${INFORMIXDIR}/lib > >/esql -R${INFORMIXDIR}/lib > > > >Adding the run time library search path (-R) results in the > above error. Am > >I heading in the right direction? > > The -R option is for ld not the C compiler. You should have > something like > this in your Makefile: > > LIBDIRS= -L${INFORMIXDIR}/lib/esql -L${INFORMIXDIR}/lib > LDFLAGS= -G -R > /usr/dt/lib:/usr/openwin/bin/lib:${INFORMIXDIR}/lib:${INFORMIXDIR} > /lib/esql LDFLAGS="-G -R /usr/dt/lib:/usr/openwin/lib:/usr/informix/lib:/usr/informix/lib/esql " >>> import _kinfxdbmodule Traceback (innermost last): File "", line 1, in ? ImportError: ld.so.1: python: fatal: relocation error: file /usr/informix/lib/esql/libixsql.so: symbol ifx_checkAPI: referenced symbol not found Still unable to get the _informixdb or _kinfxdb modules working. From eb@tunes.com Sat Oct 10 00:37:26 1998 From: eb@tunes.com (Erik Bartels) Date: Fri, 9 Oct 1998 16:37:26 -0700 Subject: [DB-SIG] Unable to complete install of informixdb Message-ID: <001f01bdf3dd$c589b420$63580ece@moose.tunesnetwork.com> > -----Original Message----- > From: Anthony M. Ingraldi [mailto:A.M.INGRALDI@larc.nasa.gov] > Sent: Wednesday, September 23, 1998 5:31 AM > To: eb@tunes.com > Subject: RE: [DB-SIG] Unable to complete install of informixdb > > > > > >LIBDIRS= -L${INFORMIXDIR}/lib -L${INFORMIXDIR}/lib/esql > -R${INFORMIXDIR}/lib > >/esql -R${INFORMIXDIR}/lib > > > >Adding the run time library search path (-R) results in the > above error. Am > >I heading in the right direction? > > The -R option is for ld not the C compiler. You should have > something like > this in your Makefile: > > LIBDIRS= -L${INFORMIXDIR}/lib/esql -L${INFORMIXDIR}/lib > LDFLAGS= -G -R > /usr/dt/lib:/usr/openwin/bin/lib:${INFORMIXDIR}/lib:${INFORMIXDIR} > /lib/esql LDFLAGS="-G -R /usr/dt/lib:/usr/openwin/lib:/usr/informix/lib:/usr/informix/lib/esql " >>> import _kinfxdbmodule Traceback (innermost last): File "", line 1, in ? ImportError: ld.so.1: python: fatal: relocation error: file /usr/informix/lib/esql/libixsql.so: symbol ifx_checkAPI: referenced symbol not found Still unable to get the _informixdb or _kinfxdb modules working. Erik From Anthony Baxter Sat Oct 10 06:14:23 1998 From: Anthony Baxter (Anthony Baxter) Date: Sat, 10 Oct 1998 15:14:23 +1000 Subject: [DB-SIG] Oracle 8 Linux and oracledb In-Reply-To: Your message of "Fri, 09 Oct 1998 20:45:43 +0100." <19981009194549Z78879-299+173@microweb.nl> Message-ID: <199810100513.PAA22405@koro.off.connect.com.au> >>> tukker@microweb.nl wrote > the oraclemodule part of the Makefile in the oracledb package: > > oracledbmodule$(SO): oradbmodule.o dbi.o; $(LDSHARED) oradbmodule.o dbi.o -L/homeb/oracle/lib/ -L/homeb/oracle/rdbms/lib /homeb/oracle/lib/scorept.o -L/h omeb/oracle/rdbms/public -lnetv2 -lnttcp -lnetwork -lncr -lvsn -lcommon -lgener ic -lcore4 -lnlsrtl3 -lepc -lsql -lclient -lclntsh -ldl -o oracledbmodule$(SO) > > The linking of the libraries differs of the results found by the auto-generate > script... Hm, ok, I'll add this to the "recipe" section of the distribution. Could someone please mail me a tar file of the various Makefiles that Oracle distribute with the Oracle8 version on Linux? I will try to work out how to improve the auto-generation script further... Anthony From caryc@shore.net Wed Oct 21 21:25:24 1998 From: caryc@shore.net (Cary Collett) Date: Wed, 21 Oct 1998 16:25:24 -0400 Subject: [DB-SIG] Solid and Python Message-ID: <19981021162524.A24103@shore.net> I'm thinking about using Solid Server (http://www.solidtech.com) for a web project that will (of course!) use Python. I notice that the Solid modules is on version 0.0.7 and seems to be about a year old. So, my question is, is it stable and otherwise usable? Can I call stored procedures from it? Does it work with the current version of Solid Server? Thanks, Cary -- Cary Collett cary@ratatosk.org To me, boxing is like ballet, except there's no dancing, no choreography and the dancers hit eachother. From akuchlin@cnri.reston.va.us Wed Oct 21 21:27:38 1998 From: akuchlin@cnri.reston.va.us (Andrew M. Kuchling) Date: Wed, 21 Oct 1998 16:27:38 -0400 (EDT) Subject: [DB-SIG] Solid and Python In-Reply-To: <19981021162524.A24103@shore.net> References: <19981021162524.A24103@shore.net> Message-ID: <13870.17218.741263.542906@amarok.cnri.reston.va.us> Cary Collett writes: >I'm thinking about using Solid Server (http://www.solidtech.com) >for a web project that will (of course!) use Python. I notice that >the Solid modules is on version 0.0.7 and seems to be about a year >old. >So, my question is, is it stable and otherwise usable? Can I call >stored procedures from it? Does it work with the current version >of Solid Server? I'd be interested in knowing the answer to this question, too; I'm trying to decide on a database to use at work, and Solid is the best contender so far. Version 0.0.7 of the Python module compiled just fine for me with Solid 2.3, though I haven't attempted anything serious yet. -- A.M. Kuchling http://starship.skyport.net/crew/amk/ The dandy has one unique advantage over the common herd. No matter what the situation, he will always be more exquisitely dressed than his enemies. Therefore, he has already triumphed. -- Sebastian, in SEBASTIAN O #1 From adustman@comstar.net Wed Oct 21 22:26:50 1998 From: adustman@comstar.net (Andy Dustman) Date: Wed, 21 Oct 1998 17:26:50 -0400 (EDT) Subject: [DB-SIG] Solid and Python In-Reply-To: <13870.17218.741263.542906@amarok.cnri.reston.va.us> Message-ID: On Wed, 21 Oct 1998, Andrew M. Kuchling wrote: > Cary Collett writes: > >I'm thinking about using Solid Server (http://www.solidtech.com) > >for a web project that will (of course!) use Python. I notice that > >the Solid modules is on version 0.0.7 and seems to be about a year > >old. > >So, my question is, is it stable and otherwise usable? Can I call > >stored procedures from it? Does it work with the current version > >of Solid Server? > > I'd be interested in knowing the answer to this question, too; > I'm trying to decide on a database to use at work, and Solid is the > best contender so far. Version 0.0.7 of the Python module compiled > just fine for me with Solid 2.3, though I haven't attempted anything > serious yet. I had awful times with it, dumped core, did other bad things. Lately I am using mxODBC and that seems to work quite well, in practice. It's available at http://starship.skyport.net/~lemburg/. I think it may still be possible to make it dump core: Be careful that you del your cursors and set sys.last_traceback = sys.exc_traceback = None before you close the database; I have seen situations where an uncaught exception can cause a segfault. Aside from that, it's fine. Solid itself works very well, and is quite stable, though I once made a view that would crash the server (v2.2). I also find it is very much faster if you open your connection in read-only mode. I'm using it for a large web project (presently running inside a CGIHTTPServer-derived class which uses the ForkingMixIn but doesn't exec(); this setup is substationally faster than Apache-1.2.6, though without Py_apache, which caused me no end of grief as I have several .so modules...). In addition, it has to do some fast authentication (not web-related), and in those cases I'm running read-only. Hint for using Solid effectively: Use UNIX domain sockets (UPipe SOLID), particularly with the Web Engine version. -- Andy Dustman "Where do you want to go today?" -- Microsoft ComStar Communications Corp. "[Windows] isn't going anywhere any (706) 549-7689 | PGP KeyID=0xC72F3F1D time soon." -- Windows Magazine From mal@lemburg.com Wed Oct 21 22:45:45 1998 From: mal@lemburg.com (M.-A. Lemburg) Date: Wed, 21 Oct 1998 23:45:45 +0200 Subject: [DB-SIG] Solid and Python References: <19981021162524.A24103@shore.net> <13870.17218.741263.542906@amarok.cnri.reston.va.us> Message-ID: <362E5609.E8FEAB2@lemburg.com> Andrew M. Kuchling wrote: > > Cary Collett writes: > >I'm thinking about using Solid Server (http://www.solidtech.com) > >for a web project that will (of course!) use Python. I notice that > >the Solid modules is on version 0.0.7 and seems to be about a year > >old. > >So, my question is, is it stable and otherwise usable? Can I call > >stored procedures from it? Does it work with the current version > >of Solid Server? > > I'd be interested in knowing the answer to this question, too; > I'm trying to decide on a database to use at work, and Solid is the > best contender so far. Version 0.0.7 of the Python module compiled > just fine for me with Solid 2.3, though I haven't attempted anything > serious yet. FYI: Since Solid uses ODBC as native interface you can also use mxODBC. It doesn't have direct support for calling stored procedure yet, but depending on your requirements, passing an appropriate call via cursor.execute() should give you the expected results (IN/OUT parameters won't work though). Note that writing code using stored procedures is likely not to be portable between different SQL databases. You can find more information on the mxODBC web page at: http://starship.skyport.net/~lemburg/mxODBC.html A new version will be out soon, BTW. -- Marc-Andre Lemburg Y2000: 436 days left --------------------------------------------------------------------- : Python Pages >>> http://starship.skyport.net/~lemburg/ : --------------------------------------------------------- From mal@lemburg.com Wed Oct 21 23:07:49 1998 From: mal@lemburg.com (M.-A. Lemburg) Date: Thu, 22 Oct 1998 00:07:49 +0200 Subject: [DB-SIG] Solid and Python References: Message-ID: <362E5B35.1DB68E32@lemburg.com> Andy Dustman wrote: > > On Wed, 21 Oct 1998, Andrew M. Kuchling wrote: > > I'm trying to decide on a database to use at work, and Solid is the > > best contender so far. Version 0.0.7 of the Python module compiled > > just fine for me with Solid 2.3, though I haven't attempted anything > > serious yet. > > I had awful times with it, dumped core, did other bad things. Lately I am > using mxODBC and that seems to work quite well, in practice. It's > available at http://starship.skyport.net/~lemburg/. I think it may still > be possible to make it dump core: Be careful that you del your cursors and > set sys.last_traceback = sys.exc_traceback = None before you close the > database; I have seen situations where an uncaught exception can cause a > segfault. Aside from that, it's fine. Does that error still occur with the latest version (0.8.1) ? I added lot's of checks for closed connections etc. in 0.8.1 that should take care of the segfaults when garbage collecting cursors. -- Marc-Andre Lemburg Y2000: 436 days left --------------------------------------------------------------------- : Python Pages >>> http://starship.skyport.net/~lemburg/ : --------------------------------------------------------- From adustman@comstar.net Wed Oct 21 23:12:56 1998 From: adustman@comstar.net (Andy Dustman) Date: Wed, 21 Oct 1998 18:12:56 -0400 (EDT) Subject: [DB-SIG] Solid and Python In-Reply-To: <362E5B35.1DB68E32@lemburg.com> Message-ID: On Thu, 22 Oct 1998, M.-A. Lemburg wrote: > Does that error still occur with the latest version (0.8.1) ? I added > lot's of checks for closed connections etc. in 0.8.1 that should > take care of the segfaults when garbage collecting cursors. Well, hard to say. I forget exactly what the last version was I experienced the problem on, and I am running 0.8.1 now. So it maybe be the earlier comments don't apply, except that it is much more stable that SolidPython (or the same author's ODBC module, which succeeded it). -- Andy Dustman "Where do you want to go today?" -- Microsoft ComStar Communications Corp. "[Windows] isn't going anywhere any (706) 549-7689 | PGP KeyID=0xC72F3F1D time soon." -- Windows Magazine From adustman@comstar.net Wed Oct 21 23:37:13 1998 From: adustman@comstar.net (Andy Dustman) Date: Wed, 21 Oct 1998 18:37:13 -0400 (EDT) Subject: [DB-SIG] Solid and Python In-Reply-To: <362E5609.E8FEAB2@lemburg.com> Message-ID: On Wed, 21 Oct 1998, M.-A. Lemburg wrote: > Since Solid uses ODBC as native interface you can also use mxODBC. > It doesn't have direct support for calling stored procedure yet, > but depending on your requirements, passing an appropriate call > via cursor.execute() should give you the expected results (IN/OUT > parameters won't work though). I have had occasion to use a stored procedure call with mxODBC (to generate sequence numbers) and it works fine. -- Andy Dustman "Where do you want to go today?" -- Microsoft ComStar Communications Corp. "[Windows] isn't going anywhere any (706) 549-7689 | PGP KeyID=0xC72F3F1D time soon." -- Windows Magazine From tbryan@arlut.utexas.edu Thu Oct 29 16:06:41 1998 From: tbryan@arlut.utexas.edu (Thomas Bryan) Date: Thu, 29 Oct 1998 10:06:41 -0600 (CST) Subject: [DB-SIG] Test... Message-ID: I just signed up on this list a few days ago, but I haven't received a single message. Is it a quiet group or a dead group? Or perhaps I'm not really on the distribution list... ---Tom ------------------------------------------- Tom Bryan Applied Research Laboratories University of Texas at Austin From gstein@lyra.org Thu Oct 29 17:55:14 1998 From: gstein@lyra.org (Greg Stein) Date: Thu, 29 Oct 1998 09:55:14 -0800 Subject: [DB-SIG] Test... References: Message-ID: <3638AC02.7A43D92B@lyra.org> Thomas Bryan wrote: > > I just signed up on this list a few days ago, > but I haven't received a single message. > Is it a quiet group or a dead group? Quiet group. You can get an idea of what some of the traffic looks like through a brief scan of the archives at: http://www.python.org/mailman/listinfo/db-sig Cheers, -g -- Greg Stein (gstein@lyra.org)