Thread: Table partitioning

Table partitioning

From
Robert Gravsjö
Date:
While reading through the docs on Partitioning,
http://www.postgresql.org/docs/current/static/ddl-partitioning.html,
I got to wonder about the example given.

The text in 5.9.2 states, item 1 in the first section, that the master
table will contain no data. This is later confirmed by the example code
where the trigger function, measurement_insert_trigger, redirects
inserts to child tables and, failing to do so, raises an exception.

Is there a reason to avoid populating the master table other that the
cost of the data always being included when querying?
My concern is that I would like to have the ELSE clause in
measurement_insert_trigger just raise a log message and then return NEW.

Am I missing some huge drawback?

Regards,
roppert

Re: Table partitioning

From
Tom Lane
Date:
=?ISO-8859-1?Q?Robert_Gravsj=F6?= <robert@blogg.se> writes:
> Is there a reason to avoid populating the master table other that the
> cost of the data always being included when querying?

You can do it if you want ... I think most people think it complicates
data management, but there's nothing in the system design that prevents
it.

            regards, tom lane