6 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: 0.4 and server-side ...| From | Sent On | Attachments |
|---|---|---|
| Dan Watson | 26 Sep 2007 12:52 | |
| Michael Bayer | 26 Sep 2007 13:34 | |
| Dan Watson | 26 Sep 2007 14:30 | |
| Michael Bayer | 26 Sep 2007 17:01 | |
| Michael Bayer | 26 Sep 2007 17:03 | |
| Dan Watson | 27 Sep 2007 15:15 |
| Subject: | [sqlalchemy] Re: 0.4 and server-side cursors![]() |
|---|---|
| From: | Dan Watson (dcwa...@gmail.com) |
| Date: | 09/27/2007 03:15:18 PM |
| List: | com.googlegroups.sqlalchemy |
looks like it won't work using psycopg2's named cursor implementation, at least not without some patching. it seems like psycopg should fill in cursor.description after it issues the DECLARE, but it doesn't. you can do it using one normal (non-named) cursor in SA using the method above, but it would probably require some significant work, since you'd have to transform SELECT statements into FETCH statements.
anyway, thanks for the fix!
On Sep 26, 8:01 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
On Sep 26, 2007, at 5:31 PM, Dan Watson wrote:
cursor.description isn't available after the DECLARE (analogous to conn.cursor("x")), but is available after a FETCH (analogous to a cur.fetchXXX()). If you want to get rid of the buffering resultproxy, you can do a "FETCH ABSOLUTE 0 FROM cursor_name" - that will make cursor.description available, and leave the SS cursor positioned before the first row.
hm does that require a second cursor ? its giving me "cant execute twice on a named cursor".
if so, the current approach we have is probably more efficient...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---




