partitioning example

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема partitioning example
Дата
Msg-id dcc563d10906171419jf15c10bpe62f451457ca9870@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
So, I threw this together last night.  It's not pretty, it's not
perfect, but it works well enough.  There are two files, attached,
mkstp and mktrig.  Both are php programs.  The first, mkstp makes
partitions.  mkstp checks to see if a partition table already exists,
if it does it goes on to the next date, otherwise it creates the new
partition and (in this case) creates indexes.  You can throw in grants
there as well.  mktrig prints out the text needed to create the
trigger.  It requires to be run something like ./mktrig | psql mydb to
work.  So it's easy to see your trigger creation script.  Feel free to
make it work just by hitting the db if it helps you.  These scripts,
in a very similar form are working quite well for me.  A third small
.sql script is included called moveit.  It's designed to move data
from the parent table into its children, 100000 rows at a time.
Suggestions welcome.

Вложения

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

Предыдущее
От: Maxim Boguk
Дата:
Сообщение: Some strange bug with drop table with slony cluster
Следующее
От: Konstantin Izmailov
Дата:
Сообщение: Re: issue with lo_lseek - it returns 4