Hi,
>>>> CREATE TABLE super_foo ( partition NUMERIC, bar NUMERIC );
>>>> ANALYZE super_foo ;
>>>>
>>>> CREATE TABLE sub_foo1 () INHERITS ( super_foo );
>>>> CREATE TABLE sub_foo2 () INHERITS ( super_foo );
>
> Yes, this could be used instead of a view. But there is one thing
> missing. You can't just insert into super_foo and aquire the "correct
> partition". You will still have to insert into the correct underlying
> table. "Real" partitioning will take care of correct partition
> selection.
I've recently used this method for partitioning data. In my setup
inserts are done inside a pl/pgsql function called at regular intervals,
so this isn't a problem for me. I didn't test it, but I think some rules
(or a trigger) could do the trick.
Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com