X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3E8E956475 for ; Wed, 9 Mar 2005 16:28:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66639-08 for ; Wed, 9 Mar 2005 16:28:53 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id BED185645A for ; Wed, 9 Mar 2005 16:28:51 +0000 (GMT) Received: (qmail 4273 invoked from network); 9 Mar 2005 16:27:51 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 9 Mar 2005 16:27:51 -0000 Message-ID: <422F243D.4060804@fastcrypt.com> Date: Wed, 09 Mar 2005 11:28:45 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mican Bican Cc: pgsql-jdbc@postgresql.org Subject: Re: java is locked when select for update References: <915cd3880503081437272e5cfb@mail.gmail.com> <915cd38805030907545882333f@mail.gmail.com> In-Reply-To: <915cd38805030907545882333f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.042 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/89 X-Sequence-Number: 12481 Mican, You can use the statement timeout GUC parameter to time out the second one. However in general holding a lock in a gui is a bad idea if you are holding it for any length of time. You may want to re-think your locking strategy. Dave Mican Bican wrote: >Hello, > >I use Postgresql 8.0.1 with java 5 and jdbc3 on windows xp. > >When I do a "select for update" a row.. and dont commit the statement >and when in this time an other user do also this. my java gui wait and >locked till the first user commit his statement.. my question is how >can I realize this with java.. for example why they are not a >SQLException or are Error like "an other user is updating this row"... >or can I say to java "dont wait" or "dont lock" when you make a select >for update and an other user before you make this.. > >thank you.. > >best regards > >Mican Bican > >---------------------------(end of broadcast)--------------------------- >TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561