Postgres support
Steve Williams
stevewilliams at wwc.com
Tue Jul 10 14:09:34 EDT 2001
Paul Boddie wrote:
> Steve Williams <stevewilliams at wwc.com> wrote in message news:<3B47C125.A65E5EAC at wwc.com>...
> [snip]
> > Nevertheless, I've managed to survive and prosper on a meager toolkit of
> > (Select, Insert, Delete, Update, Create, Drop, etc) on SQL-Server, Sybase,
> > Informix, DB2, and Oracle. If I'm not fastidious, I can even get by with it
> > in ACCESS.
>
> How do you manage to do different types of joins? Do any of the systems you mention use the
> explicit join syntax, for example?
My work lately has been in DB2 and I use explicit joins exclusively--they provide the level of
documentation and control I want and need. It's been a long time since I've used anything
else. I also use Interbase for a BiTemporal database I'm developing and, again, I use explicit
joins. When I worked in SQL-Server, I used a sad mixture of implicit and explicit joins--I
hadn't seen the light yet. I can't remember specifically about my work with the others.
> What about the statement parameter (bind variable) syntax?
>
> As far as binding, Python does a nice job for me:
>
> cursorODS = connectionODS.cursor()
> intInvoiceNumber = int(str(parmInvoiceNumber))
> parmList = (intInvoiceNumber,)
> cursorODS.execute("select " \
> + "InvoiceNumber,LineNumber,PartNumber,Description,Quantity,UnitOfMeasure,"
> + "Price,ExtendedSale,Cost,ExtendedCost,GP,GPPercent " \
> + "from ODS.OrderLineDetail " \
> + "where InvoiceNumber = ?",parmList)
> resultSet = cursorODS.fetchall()
> cursorODS.close()
> return resultSet
>
> This works for DB2 and Interbase via ODBC and mxODBC.
> > > But most likely the usual crybabies will still be crying about "RAW" (sic)
> > > C-level interfacing (to a zillion incompatible proprietary idiotic API's, no
> > > doubt -- the fact that there IS a solid, well-developed standard doesn't
> > > count:-). So, naah, not worth the bother.
> >
> > I take no notice of that remark. Do you have an opinion on Corba?
>
> Which standard are we talking about now? ADO and COM aren't exactly
> there on most flavours of UNIX, if at all. Of course, there's always
> ODBC. ;-)
>
> Paul
I know very little about ADO or COM. Although mxODBC is a marvellous package, I'm always
suspicious of the actual ODBC drivers. I would rather directly interface with my target
database. But I don't have compile capability on some of my platforms (AIX or anything not
WinTel, actually), so my contribution to this thread was a fantasy about pre-compiled drivers
for all the databases on all the platforms.
In general, I don't see much emphasis on relational databases in the Python jungle.
More information about the Python-list
mailing list