SELECT statement_timeout(integer) in lieu of setQueryTimeout at the statement level

From: Johnny Luong <johnny(dot)luong(at)trustcommerce(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: SELECT statement_timeout(integer) in lieu of setQueryTimeout at the statement level
Date: 2011-06-03 18:40:50
Message-ID: 4DE92AB2.90507@trustcommerce.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi All,

I'm trying to set an upper bound on the time a particular
PreparedStatement (via executeQuery, executeBatch) and it looks like
setQueryTimeout is not actually implemented. Assuming potential network
failures/delay occur infrequently between the JDBC app and the Postgres
server, would doing a SELECT statement_timeout() at the start of the
connection simulate the behavior of setQueryTimeout in the other cases?

Best,
Johnny
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJN6SqyAAoJENQfv1FjsMMvjcUQAL769f0fBN0e4QpqCHplNmhj
bVXJxyiOtAEHaDsBAkXX2odPOKbEiC9RljGqAeJqHj7b10zbY+OZ/ZkOxl7eiPsR
IziC/tcS2bsc79jRLjJQqaBFL0qtFfRXBbgQo+9suRTvggb7fCHz8ThXE0U159ot
R96c0HwjCSZaaqfU8tspkNWabVV5/lxqL8JskBQ6w6onrhcTx+gMdZ8gNZTVYLye
vDYEpJgE4dOcmNmoA77nIZ/nkaeuOj/TRArovPvvOetAL+ynx1/gRbC2vjsYUuNk
JUkXJ5bD7TdoWKOeyDOkVtjXhLBaePD3EVUKYwfmovzKWng3wIR+H3gERtRxnlvb
7ZGt+bwLMJ4HzU8aRePKY4nhzrQGCxG9lH0O1fj3oF3pZ1iiJO6U7yJvy1z87hgk
10EmjmOs5usMtRy1BS7fsNO8hz6KPSwiif4NLw0ZeL5kA0YcN8nwQygZFJfywcIK
9bAZbblYTYOn9WydLbyTPX97FD3fBAeRKp8otiD63HSAV0ASfYB6nuo9VVQe7WkX
db1+iNARX03DO2pxLoA/IhfdRJX860b3pziBAo+rX+bi1JNMY9HUlsmuLwTNMZJS
OoaZnx5WEHtxCbJ971Z4X3RC9My6UMiGB3KEAb5XmWgvvDdVGKPE3NxGVhnP64CW
LhRW3q9tREpBAzn98Kbp
=QClW
-----END PGP SIGNATURE-----

Browse pgsql-jdbc by date

  From Date Subject
Next Message Steven Schlansker 2011-06-03 20:04:58 Accepting Object[] as an acceptable input to setObject with Types.ARRAY?
Previous Message David Boreham 2011-06-03 16:20:12 Re: Mixed up protocol packets in server response?