pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Hoover <revoohc@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Fwd: Help with rules
Date: Thu, 11 Aug 2005 10:04:56 -0400
Message-ID: <1d219a6f050811070477163a2b@mail.gmail.com> (raw)
In-Reply-To: <1d219a6f05080512292b8c0e2f@mail.gmail.com>
References: <1d219a6f05080512292b8c0e2f@mail.gmail.com>

Sorry for the repost, but can anyone comment on this, please?

---------- Forwarded message ----------
From: Chris Hoover <revoohc@gmail.com>
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



view thread (2+ messages)

Message-ID: <1d219a6f050811070477163a2b@mail.gmail.com>
Permalink:  ../1d219a6f050811070477163a2b@mail.gmail.com/
Also on:    postgresql.org/message-id/1d219a6f050811070477163a2b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: revoohc@gmail.com
  Subject: Re: Fwd: Help with rules
  In-Reply-To: <1d219a6f050811070477163a2b@mail.gmail.com>
  References: <1d219a6f05080512292b8c0e2f@mail.gmail.com> <1d219a6f050811070477163a2b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox