Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-14 Thread DrakoRod
Yep!! Today I tested with triggers instead rules and the sequence goings well. Thanks for your help!! - Dame un poco de fe, eso me bastarĂ¡. Rozvo Ware Solutions -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-14 Thread Alban Hertroys
> On 14 Feb 2018, at 2:48, DrakoRod wrote: > CREATE OR REPLACE RULE inserts_customer_part1 > AS ON INSERT TO customers > WHERE new.id < 1 > DO INSTEAD INSERT INTO customers_part1 SELECT NEW.*; > > CREATE OR REPLACE RULE inserts_customer_part2 > AS ON INSERT TO customers > WHERE new.id >= 1

Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-13 Thread DrakoRod
Sorry, your right! The example is: CREATE TABLE customers ( id serial PRIMARY KEY, name TEXT, other_data TEXT ); CREATE TABLE customers_part1( CHECK (id<1) )INHERITS (customers); CREATE TABLE customers_part2( CHECK (id>=1 AND id<2) )INHERITS (customers); CREATE OR R

Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-13 Thread David G. Johnston
On Tuesday, February 13, 2018, DrakoRod wrote: > Hi folks!! > I have a problem with a serial data type and partitioned table, I used > rules > to insert in child tables. But the problem is that the some does'nt insert > and the sequence value jump sometimes 3 in 3 or 10 in 10. Do not know what

Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-13 Thread DrakoRod
Hi folks!! I have a problem with a serial data type and partitioned table, I used rules to insert in child tables. But the problem is that the some does'nt insert and the sequence value jump sometimes 3 in 3 or 10 in 10. The example is the next: I don't understand why sequence jumps in this