Re: Partitioning...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Milen Kulev" <makulev(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Partitioning...
Date: 2006-06-12 22:17:46
Message-ID: 13199.1150150666@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Milen Kulev" <makulev(at)gmx(dot)net> writes:
> But When I issue:
> insert into part(id1, id2, filler)
> select
> round( (random()*20)::bigint,0) as id1, <---!!! Note that both partitions should be populated!
> round( (random()*20)::bigint,0) as id2,
> 'TTTTTTTTTTTESTTTTTZZZZZZZZZZZZZZZZZZZ'
> from generate_series(0,100000);

> ERROR: new row for relation "part_id1_0_10" violates check constraint "part_id1_0_10_id1_check"

Don't use random() in your test case.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Watson 2006-06-12 22:18:29 Searching BLOB
Previous Message Milen Kulev 2006-06-12 22:02:42 Partitioning...