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
> 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
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
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
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