David Gardner wrote:
>
> I have a PostgreSQL function that returns a composite type (a text field
> and 6 bigint columns).
> Currently I am calling it with:
> session.query(Job,func.farm.call_job_status(Job.path)).filter(Job.path=='testshow').first()
>
> Which returns a tuple, but the second element is a string. I could
> probably parse the string, but that wouldn't be very elegant.
> I was wondering is there an object that I can subclass to support this?
>
> I tried passing in type_=(String,Integer,...)  as well as
> type_=composite(SomeObj) neither worked.

unsure what this means.  the text field + 6 int columns are returned as
one big string ?  if so, that would be a postgresql/psycopg2 behavior, so
you'd have to parse the string (most cleanly using TypeDecorator).



--~--~---------~--~----~------------~-------~--~----~
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