<p>On Jul 17, 2011 4:30 PM, "Christoph Zwerschke" <<a href="mailto:cito@online.de">cito@online.de</a>> wrote:<br>
><br>
> Am 16.07.2011 19:48 schrieb Christoph Zwerschke:<br>
><br>
>> Good question. Pygres supports "pyformat", which means "extended" format<br>
>> codes. Not sure whether the "extended" refers only to dictionary style<br>
>> parameters or also other format codes - the specs are unclear. But we<br>
>> should clarify this first.<br>
><br>
><br>
> 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.</p>
<p>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.</p>
<p>><br>
> 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.</p>
<p>Nice one, thanks guys for turning this issue around so promptly.</p>
<p>-- Maxim<br>
</p>