Re: About mogrify

Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Organization initd.org
Message-ID <[email protected]>
Il giorno mer, 19/11/2008 alle 18.27 +0100, paftek ha scritto:
> 
> Speed !
> http://www.depesz.com/index.php/2007/07/05/how-to-insert-data-to-database-as-fast-as-possible/
> 
Ok.

> I also use mogrify() to add WHERE conditions to my queries according
> to what the user decides to filter on.
>
> SELECT * FROM item
> WHERE user_id = 1
>     AND price > 10 -- added using mogrify()
>     AND quantity > 50 -- added using mogrify()

I don't understand why you need to use mogrify() here.

federico

-- 
Federico Di Gregorio                         http://people.initd.org/fog
DISCLAIMER. If I receive a message from you, you are agreeing that:
 1. I am by definition, "the intended recipient".
 2. All information in the email is mine to do with as I see fit and
 make such financial profit, political mileage, or good joke as it lends
 itself to. In particular, I may quote it on USENET or the WWW.
 3. I may take the contents as representing the views of your company.
 4. This overrides any disclaimer or statement of confidentiality that
 may be included on your message.

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkklJ0AACgkQvcCgrgZGjeuRkgCaAgB9CFNKelGbWamDypWNrDHt
XRAAnAmbWeu5iwQf5UzIWfo8F4pMJqcc
=YCy/
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.