X-Original-To: pgsql-sql@postgresql.org Received: from lapcrew.com (pcp01360251pcs.benslm01.pa.comcast.net [68.81.104.121]) by postgresql.org (Postfix) with ESMTP id 4CA41475EB2 for ; Fri, 7 Mar 2003 08:37:11 -0500 (EST) Received: from Spooler by lapcrew.com (Mercury/32 v3.31) ID MO0003E2; 6 Mar 03 08:32:30 -0600 Received: from spooler by lapcrew.com (Mercury/32 v3.31); 6 Mar 03 08:31:56 -0600 Received: from lapcrew.com (68.81.104.121) by Lapcrew Mail Server (Mercury/32 v3.31) with ESMTP ID MG0003E1; 6 Mar 03 08:31:56 -0600 Message-ID: <3E675BDC.90703@lapcrew.com> Date: Thu, 06 Mar 2003 08:31:56 -0600 From: Mark Mitchell User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 To: jasiek@klaster.net, pgsql-sql@postgresql.org Subject: Re: Cancelling Queries References: <1046993130.21247.3.camel@sql.icnfull.com> <20030307052705.GA5440@serwer> Content-Type: multipart/alternative; boundary="------------000900030609040202080302" X-Archive-Number: 200303/193 X-Sequence-Number: 12233 --------------000900030609040202080302 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit These are select queries that may have been keyed incorrectly that I need to cancel. So a transaction won't help in this case. - Mark jasiek@klaster.net wrote: >On Thu, Mar 06, 2003 at 06:25:29PM -0500, Mark Mitchell wrote: > > >>I have a Perl program that executes PostgreSQL queries through DBI. >>Is there any way to cancel a query once its started. If I could at least >>somehow get the PID of the child process postmaster starts I could kill >>that. >> >>This may be a better question for the Perl programming list but I >>thought I'd ask you guys too >> >>Mark Mitchell >> >> >Use transactions. >Just before query finish you can confirm query (commit) or cancel it >(rollback) > >Regards, >Tomasz Myrta > >---------------------------(end of broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > > -- Mark Mitchell www.lapcrew.com Registered Linux User # 299662 Mandrake 8.0 , RedHat 8.0 --------------000900030609040202080302 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit These are select queries that may have been keyed incorrectly that I need to cancel. So a transaction won't help in this case.

- Mark

jasiek@klaster.net wrote:
On Thu, Mar 06, 2003 at 06:25:29PM -0500, Mark Mitchell wrote:
  
I have a Perl program that executes PostgreSQL queries through DBI.
Is there any way to cancel a query once its started. If I could at least
somehow get the PID of the child process postmaster starts I could kill
that.

This may be a better question for the Perl programming list but I
thought I'd ask you guys too

Mark Mitchell
    
Use transactions.
Just before query finish you can confirm query (commit) or cancel it
(rollback)

Regards,
Tomasz Myrta

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

  

-- 
Mark Mitchell
www.lapcrew.com
Registered Linux User # 299662
Mandrake 8.0 , RedHat 8.0

--------------000900030609040202080302--