Re: Trigger to create automated range partition table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I confirm: This is not working now

for pg10 see
https://www.postgresql-archive.org/BUG-15437-Segfault-during-insert-into-declarative-partitioned-table-with-a-trigger-creating-partition-td6054925.html

this kind of trigger is even not supported in pg11
postgres=# CREATE TRIGGER check_pkey BEFORE INSERT ON tabpart
postgres-#      FOR EACH ROW EXECUTE PROCEDURE public.f_check_pkey();
ERROR:  "tabpart" is a partitioned table
DETAIL:  Partitioned tables cannot have BEFORE / FOR EACH ROW triggers.

There are many development works regarding this
see all threads about ATTACH/DETACH PARTITION CONCURRENTLY
for example

Today the only solution is to create those partitions before the first
INSERT statement ;o(

Regards
PAscal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux