Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 8/28/18 11:00, Alex O'Ree wrote: >> From what i understand, the postgres jdbc driver does support > reading/writing from a result set or command via a input or output > stream, however from my testing, it looks like it just buffers the >

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-28 Thread Alex O'Ree
>From what i understand, the postgres jdbc driver does support reading/writing from a result set or command via a input or output stream, however from my testing, it looks like it just buffers the whole thing in memory. I actually had one case where i was able to insert 1.2GB of content into a

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Torsten, On 8/28/18 09:27, Torsten Krah wrote: > Am Dienstag, den 28.08.2018, 09:21 -0400 schrieb Christopher > Schultz: >> Interesting. I wonder why Postgres decided not to support that >> through the standard JDBC API. >> >> Have you tried

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-28 Thread Torsten Krah
Am Dienstag, den 28.08.2018, 09:21 -0400 schrieb Christopher Schultz: > Interesting. I wonder why Postgres decided not to support that > through > the standard JDBC API. > > Have you tried setting the "compatible" flag on the connection just > to > see if it works for you? I am curious - afaik

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 8/27/18 20:47, Alex O'Ree wrote: > On Mon, Aug 27, 2018, 7:19 PM Christopher Schultz < > ch...@christopherschultz.net> wrote: On 8/24/18 16:08, Alex O'Ree > wrote: I have a use case where i need to downcast a pooled database

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-27 Thread Alex O'Ree
I'm storing large files. Postgres has a limit for blobs and uses a different api for larger stuff. Cut off is 1gb On Mon, Aug 27, 2018, 7:19 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Alex, > > On 8/24/18 16:08, Alex

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 8/24/18 16:08, Alex O'Ree wrote: > I have a use case where i need to downcast a pooled database > connection down to the native class that is in use for the driver. > Unfortunately I don't see any APIs that I can use to do this. Is > there

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-27 Thread Alex O'Ree
I figured it out. Classpath issue. I had the postgres driver in my web app and in tomcat's lib folder. Removing from the web app fixed it. On Mon, Aug 27, 2018 at 9:47 AM Alex O'Ree wrote: > Unfortunately, it's not working. I've tried unwrap for both > org.postgresql.jdbc.PgConnection (concrete

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-27 Thread Alex O'Ree
Unfortunately, it's not working. I've tried unwrap for both org.postgresql.jdbc.PgConnection (concrete class) and org.psotgresql.PGConnection (interface) and both of them fail to unwrap. Any other suggestions? On Sun, Aug 26, 2018 at 10:04 AM Alex O'Ree wrote: > Perfect, thanks > > On Fri, Aug

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-26 Thread Alex O'Ree
Perfect, thanks On Fri, Aug 24, 2018, 5:05 PM Torsten Krah wrote: > The isWrapperFor(..) and unwrap(..) methods on the connection API should > work for this. >

Re: org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-24 Thread Torsten Krah
The isWrapperFor(..) and unwrap(..) methods on the connection API should work for this.

org.apache.tomcat.jdbc.pool casting to original connection class

2018-08-24 Thread Alex O'Ree
I have a use case where i need to downcast a pooled database connection down to the native class that is in use for the driver. Unfortunately I don't see any APIs that I can use to do this. Is there any backdoors or mechanisms I can use? Background, I'm using postgres with tomcat 8.5 and need to