Re: Negative Integers Escaping - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Negative Integers Escaping
Date
Msg-id BANLkTi=CmNqYBBbV0SvrOdL9JiFPzU-AXw@mail.gmail.com
Whole thread Raw
In response to Re: Negative Integers Escaping  (Federico Di Gregorio <federico.digregorio@dndg.it>)
List psycopg
On Sun, May 29, 2011 at 9:04 PM, Federico Di Gregorio
<federico.digregorio@dndg.it> wrote:

> A mathematical expression doesn't need, at least in SQL, any whitespace
> so, writing colname-%s is *correct* and the programmer is correct when
> expects the DB adapter to quote the arguments to make sure they don't
> introduce any new errors in SQL.

Groan... https://github.com/dvarrazzo/psycopg/commit/281427f450d6e9755d4c3cbc9fb159d45ca10ee6

tl:dr: added space in front of negative sign for all the numeric
types. With this patch the unit test doesn't report any failure, so I
hope no regression.

-- Daniele

psycopg by date:

Previous
From: Federico Di Gregorio
Date:
Subject: Re: Negative Integers Escaping
Next
From: Marko Kreen
Date:
Subject: Re: Negative Integers Escaping