X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9820529C4 for ; Thu, 11 Aug 2005 11:05:07 -0300 (ADT) 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 56112-01 for ; Thu, 11 Aug 2005 14:05:05 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by svr1.postgresql.org (Postfix) with ESMTP id 2154F52B0A for ; Thu, 11 Aug 2005 11:04:55 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 8so235990nzo for ; Thu, 11 Aug 2005 07:04:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZJh+P2Zj2WPKNzkQPJsDriDF2YchwZ1VCq4OOPfUhYBQfnhsNYP9UTs2vT1fPSDHzHFyTZPs6HyOTuuB1U8fNUTXZrZit8oX3RcMC0tzVK6A4hTciqcxq13IprHWiypihozoe6fvHktuuJJvQ/07pIJLodV70dX+UFnQRJo3qOY= Received: by 10.36.222.70 with SMTP id u70mr1490966nzg; Thu, 11 Aug 2005 07:04:56 -0700 (PDT) Received: by 10.36.24.2 with HTTP; Thu, 11 Aug 2005 07:04:56 -0700 (PDT) Message-ID: <1d219a6f050811070477163a2b@mail.gmail.com> Date: Thu, 11 Aug 2005 10:04:56 -0400 From: Chris Hoover To: pgsql-admin@postgresql.org Subject: Fwd: Help with rules In-Reply-To: <1d219a6f05080512292b8c0e2f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1d219a6f05080512292b8c0e2f@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=[RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/142 X-Sequence-Number: 18461 Sorry for the repost, but can anyone comment on this, please? ---------- Forwarded message ---------- From: Chris Hoover Date: Aug 5, 2005 3:29 PM Subject: Help with rules To: pgsql-admin@postgresql.org I need some help. I was looking at this e-mail (http://archives.postgresql.org/pgsql-performance/2005-06/msg00369.php), and it gave me a good idea on how to fake partitioning. I have created a test database with serveral identical tables. Table_2003, Table_2004, Table_2005, etc I then created the view "test_view" and defined as a union all of all of the tables. I have created several do instead insert rules trying to force the data into the correct table when I load from production data into the view/tables. However, PostgreSQL will not preform the inserts when trying to load the data. It complains about needing an uncondition ON INSERT DO INSTEAD rule. Is there anyway to have a rule that would correctly insert the data from the view into the correct underlying table when loading a file with several years of data? Thanks, Chris