Am 06.01.2013 00:43, schrieb D'Arcy J.M. Cain:
I just ran the updated unit tests against the 4.1 version and it
failed to fail other than missing pgnotify and one of the quote
tests. What update or insert test is testing the problem with 4.1?

It should fail with 4.1, and it does for me. The crucial test that should fail is TestDBClass.testInsert() in test_pg.py. I have improved the test and added many test values that had not been tested before. The critical test values that fail are those with NULL values and empty values. Also, inserting current_timestamp gives an error, because in 4.1 it is not inserted literally, but as a date string. Regarding literal values of booleans, I think there was no problem since the values that _quote() interprets as true are exactly the same as in Postgres, so when inserting them as positional parameters, everything works the same.

If it does not fail for you with 4.1 that may be because you have the current pg.py in your path. This takes precedence over the one that is installed in site-packages.

I have not yet done the same rigorous testing for update() and get() and delete(). All of these inject parameters using _quote() instead of using Postgres positional parameters now, as they did before. For get() and delete() it is certainly not a big issue, since you hardly enter empty values or current_timestamp as primary keys. But I made them work the same anyway in order to be consistent in how parameters are handled internally.

-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to