Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDXHW-0000ur-An for pgsql-performance@arkaria.postgresql.org; Wed, 12 Feb 2014 10:43:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDXHV-0003rc-Ka for pgsql-performance@arkaria.postgresql.org; Wed, 12 Feb 2014 10:43:05 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDXHT-0003rT-Fo for pgsql-performance@postgresql.org; Wed, 12 Feb 2014 10:43:03 +0000 Received: from mail.tzv.fal.de ([192.108.34.20]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDXHP-0002RT-Rn for pgsql-performance@postgresql.org; Wed, 12 Feb 2014 10:43:02 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.tzv.fal.de (Postfix) with ESMTP id B8A8210013205; Wed, 12 Feb 2014 11:42:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.tzv.fal.de Received: from mail.tzv.fal.de ([127.0.0.1]) by localhost (mail.tzv.fal.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xTTzYSTVtOUZ; Wed, 12 Feb 2014 11:42:56 +0100 (CET) Received: from [10.1.2.10] (sg.tzv.fal.de [192.108.34.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tzv.fal.de (Postfix) with ESMTPSA id 2F0C910013203; Wed, 12 Feb 2014 11:42:56 +0100 (CET) Message-ID: <1392201775.20643.6.camel@localhost> Subject: Re: list number of entries to be delete in cascading deletes From: Eildert Groeneveld Reply-To: eildert.groeneveld@fli.bund.de To: Claudio Freire Cc: postgres performance list Date: Wed, 12 Feb 2014 11:42:55 +0100 In-Reply-To: References: <52F93098.2090002@vmware.com> <19895.1392133067@sss.pgh.pa.us> <1392152044.4823.9.camel@localhost> Organization: FLI Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.3-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On Di, 2014-02-11 at 18:58 -0200, Claudio Freire wrote: > On Tue, Feb 11, 2014 at 5:54 PM, Eildert Groeneveld > wrote: > > Dear All > > > > this probably not the best list to post this question: > > > > I use cascading deletes but would like to first inform the user what she > > is about to do. > > Something like : explain delete from PANEL where panel_id=21; > > -- you are about to delete 32144 records in tables abc aaa wewew > > > > This is clearly something that can be programmed but as all information > > is available in the database schema, there should be a generalized > > procedure available. > > Granted, this is somewhat ugly, but you could issue the delete, note > down the rowcount, and rollback. Thanks Claudio, thats an option and a fallback if we do not come up with a better version. I am sure that there is something around. > > -- Eildert Groeneveld =================================================== Institute of Farm Animal Genetics (FLI) Mariensee 31535 Neustadt Germany Tel : (+49)(0)5034 871155 Fax : (+49)(0)5034 871143 e-mail: eildert.groeneveld@fli.bund.de web: http://vce.tzv.fal.de ================================================== -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance