[sqlalchemy] Configuring pre_ping causes exception on error with psycopg2

2018-02-06 Thread andre
Hello. I'm using a connection pool backed by SQLAlchemy (1.2.1) to access a Postgresql (9.6) server using the psycopg2 (2.7.3.2) driver. I have the following pool configuration options set: from sqlalchemy.dialects import postgresql DATABASE_POOL_ARGS = { 'max_overflow': 0, 'pool_size':

Re: [sqlalchemy] storing a large file into a LargeBinary question

2013-02-13 Thread Andre Charbonneau
Thanks for the feedback Michael. Lots of good information in there. I will read up on buffer() and memoryview() and also on custom SQLAlchemy types. Thanks again, Andre On 13-02-12 04:33 PM, Michael Bayer wrote: > On Feb 12, 2013, at 3:22 PM, Andre Charbonneau > wrote: > >

Re: [sqlalchemy] storing a large file into a LargeBinary question

2013-02-12 Thread Andre Charbonneau
One piece of extra information I forgot to mention in my original email is that the myobject.uploaded_file LargeBinary column attribute maps to a Postgresql bytea column. Best regards, Andre On 13-02-12 03:22 PM, Andre Charbonneau wrote: > Greetings everyone, > I have a piece of cod

[sqlalchemy] storing a large file into a LargeBinary question

2013-02-12 Thread Andre Charbonneau
load the entire file into memory at once, but stream it in chunks during the INSERT statement, but I was not able to find anything. :-( Anyone managed to implement something like this before, or know where I can read some more info about possible ways of doing this with sqlalchemy? Thanks a lot,

Re: [sqlalchemy] attribute for the size of a LargeBinary

2012-10-05 Thread Andre Charbonneau
On 12-10-05 11:27 AM, Michael Bayer wrote: > On Oct 5, 2012, at 10:26 AM, Andre wrote: > > > > > I would like to make this more efficient by adding an attribute to the > > DocumentBase class above, which simply does a SQL query to get the size of > > the &

[sqlalchemy] attribute for the size of a LargeBinary

2012-10-05 Thread Andre
r.py", line 388, in visit_column raise exc.CompileError("Cannot compile Column object until " CompileError: Cannot compile Column object until it's 'name' is assigned. I'm sure I'm missing something very basic here. Or maybe there is a simpler way of doi

[sqlalchemy] Re: problem with like

2009-10-09 Thread Andre Stechert
ing a "%" operator in your LIKE query. Cheers, Andre On Fri, Oct 9, 2009 at 5:46 AM, Christian Démolis wrote: > Hi everybody, > > I m stuck with a query about telephone number : > I want to find in my database all the contact who have a telephone number. > The difficu