Re: [sqlalchemy] postgresql large objects

2014-07-08 Thread Jonathan Vanasco
Working on this level of integration is way over my head, but I'd love to see this happen and wanted to quickly +1. I just had to refactor some code to store User Submitted Media into Postgres for background processing. While doing a bit of research, I learned that the streaming

[sqlalchemy] postgresql large objects

2014-06-25 Thread Jason Newton
Hi, I'm wondering how I might get at postgresql's large object type (lob). It's not to be confused with the TOASTED bytea, which are limited currently to 1 GiB yet in practice is much lower (for me 400MiB) - it's a special table + api designed to handle very large binary objects, like a few

Re: [sqlalchemy] postgresql large objects

2014-06-25 Thread Mike Bayer
On 6/25/14, 2:35 AM, Jason Newton wrote: Hi, I'm wondering how I might get at postgresql's large object type (lob). It's not to be confused with the TOASTED bytea, which are limited currently to 1 GiB yet in practice is much lower (for me 400MiB) - it's a special table + api designed to

Re: [sqlalchemy] postgresql large objects

2014-06-25 Thread Jason Newton
Hi, I've replied inline below. On Wed, Jun 25, 2014 at 6:46 AM, Mike Bayer mike...@zzzcomputing.com wrote: well we just added the OID type in 0.9.5, so you at least have that. I came across the entry on the issue tracker a little bit after submitting. As usual for me, it's support wasn't

Re: [sqlalchemy] postgresql large objects

2014-06-25 Thread Mike Bayer
On 6/25/14, 2:53 PM, Jason Newton wrote: Seems to fly in the face at the point of SQLA although integration difficulties are appreciated. Most advanced postgresql drivers in any language bindings have added support for this type although none of them can hide that it's file like. SQLA

Re: [sqlalchemy] postgresql large objects

2014-06-25 Thread Jason Newton
Just in case this wasn't apparent, you certainly *can* use psycopg2's bindings when you're in an otherwise SQLAlchemy app. Worst case you can retrieve a raw psycopg2 connection using connection.raw_connection and do whatever you need. If you truly have some use for LOBs, SQLAlchemy isn't

Re: [sqlalchemy] postgresql large objects

2014-06-25 Thread Mike Bayer
On 6/25/14, 5:35 PM, Jason Newton wrote: Hand crafted inserts use server side lo_create(-1) (in sql) which allocates a new large object and returning clause to get the oid in one go back to the client side. Then I start using the lobject api on the returned oid.