Re: Wierd "ProgrammingError" with "E" string prefix
Hartmut Goebel <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | Goebel Consult |
| Message-ID | <[email protected]> |
Federico Di Gregorio schrieb:
>> class Ident(object):
>> """Wrap a PostgreSQL identifier.
>>
>> Note that this adapter need to make an SQL SELECT to correctly
>> quote the identifier (that is then cached) so it can be a good
>> idea to pre-allocate identifiers by calling getquoted(conn)
>> before entering critical sections of code (where `conn` is a
>> valid connection.)
>> """
How is this meant to work?
>>> table_name = Ident('Table_One')
>>> print cur.mogrify("DROP TABLE %s", (table_name,))
...
psycopg2.ProgrammingError: can't adapt
--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP
Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
smime.p7s
(application/x-pkcs7-signature, 4.6 KB) - not displayed