-
Notifications
You must be signed in to change notification settings - Fork 417
Other examples? #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @illume, We've only open sourced asyncpg yesterday, so I believe there aren't a lot of examples with it that you can find.
Postgres doesn't provide streaming capabilities. The closest thing you can get is to use cursors to efficiently iterate over huge result sets. |
Aha! Well that explains why I can't find anything on the internet about it. If I have one row that is about 1MB (bytea https://www.postgresql.org/docs/9.5/static/datatype-binary.html), does that mean I have to wait until it is entirely written in a buffer before getting access to the full buffer? Or can I get access to the buffer with an index of where it is up to? I guess I will look through the source. I will also be using LISTEN and NOTIFY ( https://www.postgresql.org/docs/9.5/static/sql-listen.html ). Anyway... looking forward to playing with it some more. |
Yes, see issue #2. We'll implement this shortly. |
Oh! Thank you very much :) |
This adds a check that elements of sequence passed to `executemany()` are proper sequences themselves and notes the offending sequence element number in the exception message. For example: await self.con.executemany( "INSERT INTO exmany (b) VALUES($1)" [(0,), ("bad",)], ) DataError: invalid input for query argument $1 in element #1 of executemany() sequence: 'bad' ('str' object cannot be interpreted as an integer) Fixes: #807
This adds a check that elements of sequence passed to `executemany()` are proper sequences themselves and notes the offending sequence element number in the exception message. For example: await self.con.executemany( "INSERT INTO exmany (b) VALUES($1)" [(0,), ("bad",)], ) DataError: invalid input for query argument $1 in element #1 of executemany() sequence: 'bad' ('str' object cannot be interpreted as an integer) Fixes: #807
Hello!
Are there any other examples or projects other than the tests? I searched for asyncpg on nulledge/SearchEngines and couldn't find anything.
Currently I'm interested in if you can stream results from/to pg?
Many thanks.
The text was updated successfully, but these errors were encountered: