Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BA67E2E02E2 for ; Mon, 3 Mar 2008 13:38:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30498-04 for ; Mon, 3 Mar 2008 13:38:14 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from n55.bullet.mail.sp1.yahoo.com (n55.bullet.mail.sp1.yahoo.com [98.136.44.188]) by postgresql.org (Postfix) with SMTP id 19C5E2E00E5 for ; Mon, 3 Mar 2008 13:38:13 -0400 (AST) Received: from [216.252.122.217] by n55.bullet.mail.sp1.yahoo.com with NNFMP; 03 Mar 2008 17:38:12 -0000 Received: from [69.147.65.170] by t2.bullet.sp1.yahoo.com with NNFMP; 03 Mar 2008 17:38:12 -0000 Received: from [127.0.0.1] by omp505.mail.sp1.yahoo.com with NNFMP; 03 Mar 2008 17:38:12 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 29957.95242.bm@omp505.mail.sp1.yahoo.com Received: (qmail 17452 invoked by uid 60001); 3 Mar 2008 17:38:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=OMDX0DPr8ulS5vJEWywL7s3AombNLOZbIYT2CjswCA1HrF89RdzjcPKIlHrqQCq5jE5jEQH8ggAkTWt6isQVq1IfczqP55+K4p+LSKfouQSPfVbr4grkbEZ20zUCznm2WsXWzoOFaD+o6qMzw8/E5wOjlBgIXWd2SjGoyP4m7tM=; X-YMail-OSG: ESQvYZMVM1lg0OcD6r6zCNm6lcJFKR1gmlMriFSVMQGqsqDhFnjZWRR6b9h50NaHSMQJx81CPWSb.GqhhCHTfMS0U9wu7vfZiTmt Received: from [128.8.215.134] by web46015.mail.sp1.yahoo.com via HTTP; Mon, 03 Mar 2008 09:38:11 PST Date: Mon, 3 Mar 2008 09:38:11 -0800 (PST) From: Nuwan Liyanage Subject: Re: Delete from base table and not partitions To: Tom Lane Cc: pgsql-admin@postgresql.org In-Reply-To: <26518.1204564214@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-776386377-1204565891=:16659" Content-Transfer-Encoding: 8bit Message-ID: <934430.16659.qm@web46015.mail.sp1.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.329 tagged_above=0 required=5 tests=AWL=-0.082, HTML_MESSAGE=0.001, SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200803/15 X-Sequence-Number: 28498 --0-776386377-1204565891=:16659 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thank you very much, I was not aware of the 'ONLY' clause. Nuwan. Tom Lane wrote: Nuwan Liyanage writes: > Now I added the trigger rule to base_table and the data for > partition_3 is going to the right place, but I am stuck with some data > in the actual base_table. How could I move that data from the base > table to the partition_3? Something involving SELECT ... FROM ONLY base_table and then DELETE FROM ONLY base_table would do it for you. regards, tom lane --------------------------------- Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-776386377-1204565891=:16659 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thank you very much, I was not aware of the 'ONLY' clause.
Nuwan.

Tom Lane <tgl@sss.pgh.pa.us> wrote:
Nuwan Liyanage writes:
> Now I added the trigger rule to base_table and the data for
> partition_3 is going to the right place, but I am stuck with some data
> in the actual base_table. How could I move that data from the base
> table to the partition_3?

Something involving SELECT ... FROM ONLY base_table and then DELETE FROM
ONLY base_table would do it for you.

regards, tom lane


Looking for last minute shopping deals? Find them fast with Yahoo! Search. --0-776386377-1204565891=:16659--