-- bigistore operators bigistore should fetch values;
SELECT '1=>1, -1=>0'::bigistore -> -1;
SELECT '1=>1, -1=>3'::bigistore -> -1;
SELECT '0=>40000000000'::bigistore->0;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore -> 10;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore -> Array[10,0];
-- bigistore operators bigistore should check existense of a key;
SELECT '1=>1, -1=>3'::bigistore ? -1;
SELECT '1=>1, -1=>3'::bigistore ? 5;
-- bigistore operators bigistore should add two bigistore;
SELECT '1=>1, -1=>3'::bigistore + '1=>1'::bigistore;
SELECT '1=>1, -1=>3'::bigistore + '-1=>-1'::bigistore;
SELECT '1=>1, -1=>3'::bigistore + '1=>-1'::bigistore;
SELECT '1=>0, -1=>3'::bigistore + '1=>-1'::bigistore;
SELECT '1=>1, -1=>0'::bigistore + '-1=>-1'::bigistore;
-- bigistore operators bigistore should add an integer to #{type};
SELECT '1=>1, -1=>3'::bigistore  + 1;
SELECT '-1=>1, 1=>3'::bigistore  + 1;
SELECT '-1=>1, -1=>3'::bigistore + 1;
SELECT '1=>1, -1=>3'::bigistore  + 0;
SELECT '-1=>1, 1=>3'::bigistore  + 0;
SELECT '-1=>1, -1=>3'::bigistore + 0;
SELECT '1=>1, -1=>3'::bigistore  + -1;
SELECT '-1=>1, 1=>3'::bigistore  + -1;
SELECT '-1=>1, -1=>3'::bigistore + -1;
-- bigistore operators bigistore should substract two bigistore;
SELECT '1=>1, -1=>3'::bigistore - '1=>1'::bigistore;
SELECT '1=>1, -1=>3'::bigistore - '-1=>-1'::bigistore;
SELECT '1=>1, -1=>3'::bigistore - '1=>-1'::bigistore;
SELECT '1=>0, -1=>3'::bigistore - '1=>-1'::bigistore;
-- bigistore operators bigistore should substract integer from bigistore;
SELECT '1=>1, -1=>3'::bigistore  - 1;
SELECT '-1=>1, 1=>3'::bigistore  - 1;
SELECT '-1=>1, -1=>3'::bigistore - 1;
SELECT '1=>1, -1=>3'::bigistore  - 0;
SELECT '-1=>1, 1=>3'::bigistore  - 0;
SELECT '-1=>1, -1=>3'::bigistore - 0;
SELECT '1=>1, -1=>3'::bigistore  - -1;
SELECT '-1=>1, 1=>3'::bigistore  - -1;
SELECT '-1=>1, -1=>3'::bigistore - -1;
-- bigistore operators bigistore should multiply two bigistore;
SELECT '1=>3, 2=>2'::bigistore * '1=>2, 3=>5'::bigistore;
SELECT '-1=>3, 2=>2'::bigistore * '-1=>2, 3=>5'::bigistore;
SELECT '-1=>3, 2=>2'::bigistore * '-1=>-2, 3=>5'::bigistore;
SELECT '-1=>3, 2=>0'::bigistore * '-1=>-2, 3=>5'::bigistore;
-- bigistore operators bigistore should multiply #{type} with integer;
SELECT '1=>1, -1=>3'::bigistore  * 1;
SELECT '-1=>1, 1=>3'::bigistore  * 1;
SELECT '-1=>1, -1=>3'::bigistore * 1;
SELECT '1=>1, -1=>3'::bigistore  * 0;
SELECT '-1=>1, 1=>3'::bigistore  * 0;
SELECT '-1=>1, -1=>3'::bigistore * 0;
SELECT '1=>1, -1=>3'::bigistore  * -1;
SELECT '-1=>1, 1=>3'::bigistore  * -1;
SELECT '-1=>1, -1=>3'::bigistore * -1;
-- bigistore operators bigistore should return convert to array;
SELECT %%'-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore;
SELECT %#'-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore;
-- bigistore operators bigistore existence should check presence of a key;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ? 10;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ? 25;
-- bigistore operators bigistore existence should check presence of any key;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ?| Array[10,0];
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ?| Array[27,25];
-- bigistore operators bigistore existence should check presence of all key;
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ?& Array[10,0];
SELECT '-2147483647 => 10, -10 => -9223372036854775807, 0 => 5, 10 => 9223372036854775806, 2147483647 => 10'::bigistore ?& Array[27,25];
-- istore operators istore should fetch values;
SELECT '1=>1, -1=>0'::istore -> -1;
SELECT '1=>1, -1=>3'::istore -> -1;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore -> 10;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore -> Array[10,0];
-- istore operators istore should check existense of a key;
SELECT '1=>1, -1=>3'::istore ? -1;
SELECT '1=>1, -1=>3'::istore ? 5;
-- istore operators istore should add two istore;
SELECT '1=>1, -1=>3'::istore + '1=>1'::istore;
SELECT '1=>1, -1=>3'::istore + '-1=>-1'::istore;
SELECT '1=>1, -1=>3'::istore + '1=>-1'::istore;
SELECT '1=>0, -1=>3'::istore + '1=>-1'::istore;
SELECT '1=>1, -1=>0'::istore + '-1=>-1'::istore;
-- istore operators istore should add an integer to #{type};
SELECT '1=>1, -1=>3'::istore  + 1;
SELECT '-1=>1, 1=>3'::istore  + 1;
SELECT '-1=>1, -1=>3'::istore + 1;
SELECT '1=>1, -1=>3'::istore  + 0;
SELECT '-1=>1, 1=>3'::istore  + 0;
SELECT '-1=>1, -1=>3'::istore + 0;
SELECT '1=>1, -1=>3'::istore  + -1;
SELECT '-1=>1, 1=>3'::istore  + -1;
SELECT '-1=>1, -1=>3'::istore + -1;
-- istore operators istore should substract two istore;
SELECT '1=>1, -1=>3'::istore - '1=>1'::istore;
SELECT '1=>1, -1=>3'::istore - '-1=>-1'::istore;
SELECT '1=>1, -1=>3'::istore - '1=>-1'::istore;
SELECT '1=>0, -1=>3'::istore - '1=>-1'::istore;
-- istore operators istore should substract integer from istore;
SELECT '1=>1, -1=>3'::istore  - 1;
SELECT '-1=>1, 1=>3'::istore  - 1;
SELECT '-1=>1, -1=>3'::istore - 1;
SELECT '1=>1, -1=>3'::istore  - 0;
SELECT '-1=>1, 1=>3'::istore  - 0;
SELECT '-1=>1, -1=>3'::istore - 0;
SELECT '1=>1, -1=>3'::istore  - -1;
SELECT '-1=>1, 1=>3'::istore  - -1;
SELECT '-1=>1, -1=>3'::istore - -1;
-- istore operators istore should multiply two istore;
SELECT '1=>3, 2=>2'::istore * '1=>2, 3=>5'::istore;
SELECT '-1=>3, 2=>2'::istore * '-1=>2, 3=>5'::istore;
SELECT '-1=>3, 2=>2'::istore * '-1=>-2, 3=>5'::istore;
SELECT '-1=>3, 2=>0'::istore * '-1=>-2, 3=>5'::istore;
-- istore operators istore should multiply #{type} with integer;
SELECT '1=>1, -1=>3'::istore  * 1;
SELECT '-1=>1, 1=>3'::istore  * 1;
SELECT '-1=>1, -1=>3'::istore * 1;
SELECT '1=>1, -1=>3'::istore  * 0;
SELECT '-1=>1, 1=>3'::istore  * 0;
SELECT '-1=>1, -1=>3'::istore * 0;
SELECT '1=>1, -1=>3'::istore  * -1;
SELECT '-1=>1, 1=>3'::istore  * -1;
SELECT '-1=>1, -1=>3'::istore * -1;
-- istore operators istore should return convert to array;
SELECT %%'-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore;
SELECT %#'-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore;
-- istore operators istore existence should check presence of a key;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ? 10;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ? 25;
-- istore operators istore existence should check presence of any key;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ?| Array[10,0];
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ?| Array[27,25];
-- istore operators istore existence should check presence of all key;
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ?& Array[10,0];
SELECT '-2147483647 => 10, -10 => -2147483647, 0 => 5, 10 => 2147483647, 2147483647 => 10'::istore ?& Array[27,25];
