In der Dokumentation psycopg2 verweist es auf eine sql Eigenschaft voller Spaß Güte für sicher SQL-Strings erstellen. Doch mein auf Python 3 installieren, das von PyPI neuesten sein soll, enthält kein solches Attribut:Was ist mit psycopg2.sql passiert?
from psycopg2 import sql
# ImportError: cannot import name 'sql'
import psycopg2
print(dir(psycopg2)) # no mention of sql, although dir is not complete
# in the REPL
help(psycopg2) # no mention of the sql submodule that I saw
So wie kann ich sicher SQL-Strings, ohne es konstruieren (ich habe null Interesse an SQLAlchemy)? Oder sollte ich das noch haben und die Tatsache, dass es fehlt, ist besorgniserregend?
gerade geprüft 'pip freeze', ich bin auf 2.6.2. Hoppla. –