--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.
For some reason if I use CAST directly in PG, it complains "cannot
change data type of view column". Its rather cumbersome but it does
seem to at least work in SQLAlchemy. Thanks.
On Jul 5, 3:43 pm, Michael Bayer wrote:
> any expression in SQL can be coerced into a particular type using
> cas
any expression in SQL can be coerced into a particular type using
casts. PG supports the SQL standard CAST operator which SQLAlchemy
provides as expression.cast, i.e.
from sqlalchemy import cast, Integer
cast(somevalue + someothervalue, Integer)
This will instruct PG to cast the value as inte
Hello,
I have a View in a Postgres DB with some calculated columns. In
Postgres the column types are getting "lost", so essentially, despite
all the math being on integers, Postgres is spitting out columns with
the type Numeric instead of type Integer.
Using SQLAlchemy, I am therefore getting v