Siah wrote: > Problem Solved. The problem was with psycopg.Binary whose mere job is > to convert bytes into clear text for sql statement.
no, its job is to wrap strings that contain binary blobs, so that data binding works properly. you're supposed to do cursor.execute(statement, Binary(data)) and not cursor.execute(Binary(statement)) or cursor.execute("some statement %s" % Binary(statement)) or some other sillyness. it's an object wrapper, not an escape function for arbitrary SQL. Python's not PHP. for more details, see "Type Objects and Constructors" on this page http://www.python.org/dev/peps/pep-0249/ </F> -- http://mail.python.org/mailman/listinfo/python-list