Re: --//pgsql partitioning-///--------------------

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: --//pgsql partitioning-///--------------------
Дата
Msg-id 2968dfd60911040659w7014ec19o1fdd2d174e48e6c7@mail.gmail.com
обсуждение исходный текст
Ответ на --//pgsql partitioning-///--------------------  (shahrzad khorrami <shahrzad.khorrami@gmail.com>)
Ответы Re: --//pgsql partitioning-///--------------------
Список pgsql-general
On Wed, Nov 4, 2009 at 4:49 AM, shahrzad khorrami
<shahrzad.khorrami@gmail.com> wrote:
>  but problem here is how I can do something that when I insert data, the
> master table remains empty
> and just data inserted into inherited tables.
>

Here are two (not necessarily mutually exclusive) options for you:

1) use triggers/rules on the master table and do all your inserts
directed to it and have the trigger/rule do the right thing
2) write your insert/update/delete statements to use the correct
inherited table directly, and write a trigger on the master that
denies any inserts.

Did you read the documentation on partitions?  It covers this.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Could not read directory "pg_xlog": Invalid argument (on SSD Raid)
Следующее
От: Joshua Tolley
Дата:
Сообщение: Re: createlang error(s)