2

Suppose I have:

untimedStatement = connection.createStatement() ;
timedStatement = connection.createStatement();

And then run

timedStatement.execute("SET statement_timeout TO " + timeout);

Will the SET statement_timeout command also affect untimedStatement? I was hoping it would not but some of the behaviour I'm observing suggests that SET statement_timeout has a "universal" effect (at least for the life of the program)

1 Answer 1

4

Yes, as long as they are executed on the same connection.

You can use SET LOCAL statement_timeout to make it affect only the current transaction. Details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.