Re: Statement Timeout and Locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Statement Timeout and Locking
Date: 2005-04-28 14:11:37
Message-ID: 11053.1114697497@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

Markus Schaber <schabi(at)logix-tt(dot)com> writes:
> conn.createStatement().execute("SET statement_timeout TO 5000; LOCK TABLE exampletable IN EXCLUSIVE MODE; SET statement_timeout TO DEFAULT;");

At least in more recent JDBC drivers, I'd expect the above to fail
entirely because you can only put one SQL command per V3 Parse message.
Try splitting it into three statements.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2005-04-28 14:21:06 Re: Statement Timeout and Locking
Previous Message Tom Lane 2005-04-28 14:00:01 Re: [proposal] protocol extension to support loadable stream filters

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-04-28 14:21:06 Re: Statement Timeout and Locking
Previous Message Tom Lane 2005-04-28 13:58:22 Re: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution