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 D94BA5290A for ; Fri, 5 Aug 2005 16:29:51 -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 28208-06 for ; Fri, 5 Aug 2005 19:29:31 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.198]) by svr1.postgresql.org (Postfix) with ESMTP id 05501528C6 for ; Fri, 5 Aug 2005 16:29:29 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 8so366916nzo for ; Fri, 05 Aug 2005 12:29:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=byoZjiJDI3PTlTGhLSdYJNEAnEizDj/LfchDe9pEAXdDZcMZedD05sZhKHT1faoRDBVLzJTs+HsphUGq0FlCjJHTW2hjCUwZutrpiUBGldp7EhpFHq8ePn4U01CPASFV9AjORWkrHXNPKgHdq04N+/8uckI64Llm66h4gQ+RQnA= Received: by 10.36.23.7 with SMTP id 7mr1456469nzw; Fri, 05 Aug 2005 12:29:28 -0700 (PDT) Received: by 10.36.25.14 with HTTP; Fri, 5 Aug 2005 12:29:28 -0700 (PDT) Message-ID: <1d219a6f05080512292b8c0e2f@mail.gmail.com> Date: Fri, 5 Aug 2005 15:29:28 -0400 From: Chris Hoover Reply-To: Chris Hoover To: pgsql-admin@postgresql.org Subject: Help with rules Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 X-Spam-Level: X-Archive-Number: 200508/64 X-Sequence-Number: 18383 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