postgresql-jdbc.git / summary / log / commit / refs

commit    f2bb593f752f1c0cf8aaa758e2656077b2379d97
Author:   Kris Jurka <books@ejurka.com>
Date:     Tue Jan 15 03:29:15 2008 +0000

    Throw an exception if people try to use setQueryTimeout with a
    non-zero value as it is not implemented.


org/postgresql/jdbc2/AbstractJdbc2Statement.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java index 4cb13b65..11ee6ba0 100644 --- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java +++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java @@ -3,7 +3,7 @@ * Copyright (c) 2004-2008, PostgreSQL Global Development Group * * IDENTIFICATION -* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.105 2007/12/15 16:12:14 jurka Exp $ +* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.106 2008/01/08 06:56:28 jurka Exp $ * *------------------------------------------------------------------------- */ @@ -598,6 +598,10 @@ public abstract class AbstractJdbc2Statement implements BaseStatement if (seconds < 0) throw new PSQLException(GT.tr("Query timeout must be a value greater than or equals to 0."), PSQLState.INVALID_PARAMETER_VALUE); + + if (seconds > 0) + throw Driver.notImplemented(this.getClass(), "setQueryTimeout(int)"); + timeout = seconds; } [parent: 3cded7b36084]