Search Postgresql Archives

Re: Partitioning...

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

 



"Milen Kulev" <makulev@xxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux