Skip site navigation (1) Skip section navigation (2)

Re: how to monitor the amount of bytes fetched in a executeQuery()

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Albert Cardona <acardona(at)ini(dot)phys(dot)ethz(dot)ch>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()
Date: 2006-07-12 22:14:14
Message-ID: 44B57436.9040308@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Albert Cardona wrote:

> I will have a look at the code myself but I'm not familiar with it -you say 
> it's at PGconnection class?

org.postgresql.PGConnection is our extension interface that applications 
use to get access to driver-specific features. The actual implementation 
would go in AbstractJdbc2Connection which would delegate to the 
protocol-level code in org/postgresql/core/* to get stats from the 
underlying connection. Looks like you may need to play with PGStream so 
it actually tracks the byte count, unless one of the wrapping streams 
already does that.

app code would look something like this:

   Connection c = /* get connection */;
   if (c instanceof PGConnection) {
     PGConnection pgc = (PGConnection)c;
     long byteCount = pgc.getInputByteCount(); // or whatever
   }

-O

In response to

pgsql-jdbc by date

Next:From: Folorunsho, AbayomiDate: 2006-07-13 10:14:49
Subject: CLASS EXCEPTION org.postgresql.Driver
Previous:From: Albert CardonaDate: 2006-07-12 22:00:00
Subject: Re: how to monitor the amount of bytes fetched in a executeQuery()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group