Wierd "ProgrammingError" with "E" string prefix
Hartmut Goebel <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | Goebel Consult |
| Message-ID | <[email protected]> |
Hi Federico,
I'm experiencing a wierd "ProgrammingError" psycopg2 2.0.7:
psycopg2.ProgrammingError: FEHLER: Syntaxfehler bei »E'Table_One'«
LINE 1: DROP TABLE E'Table_One'
psycopg seams to "quote" the table name with an "E" prefix.
The script is pretty simple:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import psycopg2
import psycopg2.extensions
table_name = 'Table_One'
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
connection = psycopg2.connect(database='test', user='postgres')
connection.set_client_encoding('UTF8')
cur = connection.cursor()
cur.execute("DROP TABLE %s", (table_name,))
Any help?
--
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