Re: money types, decimal module
Gerhard Haering <[email protected]> Thu, 18 Nov 2004 09:20:00 +0100
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Nov 18, 2004 at 02:54:31PM +1000, Timothy Smith wrote: > Billy G. Allie wrote: > [...] so i have float types ( becuase for various reasons thats what i'm > forced to use) how do i pass them in? i understand the first part of > what you are saying, if i pass string data in it will put it in > correctly for any database type. Use %s instead of %.2f as placeholder and you should be fine. As Billy said, *always* use %s as placeholder when using pyPgSQL, no matter what type the values are. -- Gerhard
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBnFswdIO4ozGCH14RAu5EAKC/wW67iP3DdxxVMAvpjEwkhcFd9gCggHQn tFrmUSxtk8fDh2Q3XVZ8d20= =Dn43 -----END PGP SIGNATURE-----