Thank you for your reply.  

 

> I’d suggest using the psycopg2 driver as it is much better supported.
>
>
I am going to consider that option.  
 

> When I used the Column name without parentheses, it works perfectly.  
>
>
> It is a really, really bad idea to use characters like parenthesis and 
> brackets in the names of columns and tables and I’d strongly recommend not 
> doing this.
>

Well, I cannot escape from using parentheses at this moment, while I do not 
want to use them.  
 

> Another approach is to use a non-named paramstyle for the engine, it has 
> to be supported by the driver; this works for psycopg2:
>
> engine = create_engine("postgresql://scott:tiger@localhost/test", 
> echo=True, paramstyle="format")
>
>
> then you get a statement like INSERT INTO test_table ("E(1)", "E(2)", 
> "E[3]") VALUES (%s, %s, %s), instead of INSERT INTO test_table ("E(1)", 
> "E(2)", "E[3]") VALUES (%(E(1))s, %(E(2))s, %(E[3])s), which is what’s not 
> compatible here.
>

Thank you very much.  
The last approach works very well both for psycopg2 and py-postgresql!

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to