Thanks michael,
But my problem here is different.
Let me give you the exact stored procedure that we have here for execution.
create or replace function getGroupByCode(group_code
groups.groupcode%type) returns setof groups as $$
declare
res groups;
begin
for res in select * from groups where groupcode = group_code loop
return next res;
end loop;
return;
end;
$$ language plpgsql;
Now I will give you the code I am trying to run.
from sqlalchemy.engine import create_engine
from sqlalchemy import func
engine =
create_engine("postgresql://gnukhata:gnukhata@localhost/K2011101512425529")
print type(engine)
res = engine.execute(func.getGroupByCode(1)).scalar()
print type(res)
for row in res:
print row['groupname']
Note that the stored procedure refers to a group table that contains
groupcode,groupname,groupdesc
So groupname is a valid column.
Yet I get the no such column error.
Can you please explain?
Happy hacking.
Krishnakant.
--
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.com.
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.