On Jul 17, 2011 4:30 PM, "Christoph Zwerschke" <[email protected]> wrote: > > Am 16.07.2011 19:48 schrieb Christoph Zwerschke: > >> Good question. Pygres supports "pyformat", which means "extended" format >> codes. Not sure whether the "extended" refers only to dictionary style >> parameters or also other format codes - the specs are unclear. But we >> should clarify this first. > > > Seems there is no clear answer (I even asked on the DB-SIG mailing list). If you use '%f' format then I think you should make sure you operate with finite values.
Thinking more about this, if nan value gets formatted with %f the resulting unquoted nan gets rejected by postgre. With this change such user code still causes an exception, but a different one. > > So I've checked this in anyway, similar to what Maxim suggested, but with some changes to make it work with older Py versions down to 2.3. Nice one, thanks guys for turning this issue around so promptly. -- Maxim
_______________________________________________ PyGreSQL mailing list [email protected] http://mailman.vex.net/mailman/listinfo/pygresql
