Re: default child of partition master
От | Gene |
---|---|
Тема | Re: default child of partition master |
Дата | |
Msg-id | 430d92a20608200958q33d4ca0epaaeafe88747a8c20@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: default child of partition master (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: default child of partition master
|
Список | pgsql-hackers |
Keep in mind if you have multiple rules for a master table, it won't return the number of affected rows as you might expect. This screws up Hibernate which I'm using for my application. It checks the return value to make sure it was inserted properly. Luckily I only need one rule which puts it into the "current" child table (im partitioning on current timestamp). I suppose I could get around this by using a stored procedure or something but that would not be as portable. I'm looking forward to future versions of PG which automate more of the partitioning features :) keep up the good work!
Gene
--
Eugene Hart
Gene
On 8/20/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"April Lorenzen" <outboundindex@gmail.com> writes:
> My suggestion is to allow specifying a default destination table in
> the master partition table definition. This default destination table
> could be changed with ALTER TABLE.
The recommended way to do this is with an ON INSERT DO INSTEAD rule
on the master table. The advantage of using rules is that you can have
several conditional rules to ensure that insertions go into the right
sub-tables, whereas a default would likely just fail :-(
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
--
Eugene Hart
В списке pgsql-hackers по дате отправления: