I am trying to access a postgres database with mixed case column names.

I am using reflection to get the table.

Here is my connect string:
'postgresql://:mike@/cedar_senior_services'


The error message:
(ProgrammingError) column "active" does not exist
LINE 1: select * from license where Active=E'yes' and LicenseType=E'...
                                    ^
 'select * from license where Active=%(Active)s and 
LicenseType=%(LicenseType)s' {'Active': 'yes', 'LicenseType': 'ADMIN'}

The error message is correct that active does not exist but Active is the 
requested column.

How do I get sqlalchemy when using postgres to quote thing so that looks for
same case column names.

Using Sqlalchemy 6.1 with postgres 8.4.4

The follow selection does work:
select * from license where "Active"='yes' and "LicenseType"='ADMIN';

Since this is my first try as using postgres from sqlalchemy I am sure that
I must by missing something simple on the connection url or create engine.




--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to