Re: DBAPI Paramstyle

2005-03-28 Thread Gerhard Haering
On Mon, Mar 28, 2005 at 01:43:28PM -0800, Andy Dustman wrote: > Tim Roberts wrote: > > [prepared statements] > > mx.ODBC does, since it is an ODBC implementation. I would be very > surprised if the Oracle adapter did not. MySQLdb does not yet, but > probably will by the end of summer (with MySQL-4

Re: DBAPI Paramstyle

2005-03-28 Thread Andy Dustman
Tim Roberts wrote: > In theory, using a paramstyle allows the query to be sent to the SQL > database backend and compiled like a program. Then, successive uses of the > same query can be done by sending just the parameters, instead of sending > the entire query string to be parsed and compiled aga

Re: DBAPI Paramstyle

2005-03-26 Thread Scott David Daniels
Tim Roberts wrote: In theory, using a paramstyle allows the query to be sent to the SQL database backend and compiled like a program. Then, successive uses of the same query can be done by sending just the parameters, instead of sending the entire query string to be parsed and compiled again and a

Re: DBAPI Paramstyle

2005-03-26 Thread woodsplitter
Tim Roberts wrote: > In theory, using a paramstyle allows the query to be sent to the SQL > database backend and compiled like a program. Then, successive uses of the > same query can be done by sending just the parameters, instead of sending > the entire query string to be parsed and compiled aga

Re: DBAPI Paramstyle

2005-03-26 Thread Tim Roberts
Bob Parnes <[EMAIL PROTECTED]> wrote: > >I have a mediocre talent at programming, which is why I chose python. >For me it was a good choice. I note this so that I hope you understand why >I say that I don't know what you are driving at. My understanding is that a >paramstyle is more efficient than

Re: DBAPI Paramstyle

2005-03-25 Thread Bob Parnes
On Thu, 24 Mar 2005 15:03:13 +0100, Fredrik Lundh <[EMAIL PROTECTED]> \ wrote: > Bob Parnes wrote: > >> I must be missing something, so perhaps someone can explain >> the benefit of a paramstyle over the usual Python formatting >> style and maybe suggest a test to show it. Thanks. > > set the par

Re: DBAPI Paramstyle

2005-03-24 Thread Fredrik Lundh
Bob Parnes wrote: > I must be missing something, so perhaps someone can explain > the benefit of a paramstyle over the usual Python formatting > style and maybe suggest a test to show it. Thanks. set the parameter to "0; DROP DATABASE template1;" and see what happens. or set it to os.urandom(100

DBAPI Paramstyle

2005-03-24 Thread Bob Parnes
The following script is a one person's comparison of three methods for accessing a postgresql database using psycopg on a debian computer running python2.3. Following it are the results of running it six times. === from time import time, clock import psycopg MAX_COUNT = 5