Skip to content

Commit f09c1f2

Browse files
authored
Merge pull request #57 from ChenHuajun/dev
Remove roaringbitmap_gpdb6.out and update README.md
2 parents 3b55111 + 577de3d commit f09c1f2

File tree

2 files changed

+18
-2710
lines changed

2 files changed

+18
-2710
lines changed

README.md

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Roaring bitmaps are compressed bitmaps which tend to outperform conventional com
1414
- PostgreSQL 10+
1515
- Other Requirements from https://github.com/RoaringBitmap/CRoaring
1616

17+
Note: The regression testing before the version release only covers PostgreSQL 13 and above.
18+
1719
## Build
1820

1921
su - postgres
@@ -27,43 +29,16 @@ Note:You can use `make -f Makefile_native` instead of `make` to let the compiler
2729

2830
make installcheck
2931

30-
# Build on PostgreSQL 9.x or Greenplum 6.0
31-
32-
Parallel execution is not supported in PostgreSQL 9.5 and earlier.
33-
If you want to compile on these early PostgreSQL versions or Greenplum 6.0(based on PostgreSQL 9.4), you need to remove the `PARALLEL` keyword from these SQL files.
34-
35-
cd pg_roaringbitmap
36-
sed 's/PARALLEL SAFE//g' -i roaringbitmap--*.sql
37-
sed -z 's/,[ \r\n]*PARALLEL = SAFE//g' -i roaringbitmap--*.sql
38-
39-
Then refer to [Build] above for building, such as the steps to build on Greenplum 6.0:
40-
41-
## Build
42-
43-
su - gpadmin
44-
make
45-
make install
46-
psql -c "create extension roaringbitmap"
47-
48-
## Test
49-
50-
sudo yum install 'perl(Data::Dumper)'
51-
make installcheck
52-
53-
Since the expected output is based on PostgreSQL 10+, this test will not pass.
54-
Check the difference in the output file. If the execution results are the same, only the execution plan or other content that is not related to pg_roaringbitmap` is different, the test can be considered OK.
55-
56-
diff results/roaringbitmap.out expected/roaringbitmap_gpdb6.out
57-
5832
# Usage
5933

60-
## about roaringbitmap data type
34+
## roaringbitmap
35+
### about roaringbitmap data type
6136

6237
Logically, you could think of roaringbitmap data type as `bit(4294967296)`, and it should be noted that
6338
the integers added to bitmaps is considered to be unsigned. Within bitmaps, numbers are ordered according to uint32. We order the numbers like 0, 1, ..., 2147483647, -2147483648, -2147483647,..., -1. But we use bigint to
6439
reference the range of these integers, that is [0 4294967296).
6540

66-
## input and ouput
41+
### input and ouput
6742

6843
Support two kind of input/output syntax 'array' and 'bytea',
6944
The default output format is 'bytea'.
@@ -101,49 +76,49 @@ output format can changed by `roaringbitmap.output_format`
10176
{1}
10277
(1 row)
10378

104-
105-
## Use bitmap as type of column
79+
### sample of usage
80+
#### Use bitmap as type of column
10681

10782
CREATE TABLE t1 (id integer, bitmap roaringbitmap);
10883

10984

110-
## Build bitmap from integers
85+
#### Build bitmap from integers
11186

11287
INSERT INTO t1 SELECT 1,rb_build(ARRAY[1,2,3,4,5,6,7,8,9,200]);
11388

11489
INSERT INTO t1 SELECT 2,rb_build_agg(e) FROM generate_series(1,100) e;
11590

116-
## Bitmap Calculation (OR, AND, XOR, ANDNOT)
91+
#### Bitmap Calculation (OR, AND, XOR, ANDNOT)
11792

11893
SELECT roaringbitmap('{1,2,3}') | roaringbitmap('{3,4,5}');
11994
SELECT roaringbitmap('{1,2,3}') & roaringbitmap('{3,4,5}');
12095
SELECT roaringbitmap('{1,2,3}') # roaringbitmap('{3,4,5}');
12196
SELECT roaringbitmap('{1,2,3}') - roaringbitmap('{3,4,5}');
12297

123-
## Bitmap Aggregate (OR, AND, XOR, BUILD)
98+
#### Bitmap Aggregate (OR, AND, XOR, BUILD)
12499

125100
SELECT rb_or_agg(bitmap) FROM t1;
126101
SELECT rb_and_agg(bitmap) FROM t1;
127102
SELECT rb_xor_agg(bitmap) FROM t1;
128103
SELECT rb_build_agg(e) FROM generate_series(1,100) e;
129104

130-
## Calculate cardinality
105+
#### Calculate cardinality
131106

132107
SELECT rb_cardinality('{1,2,3}');
133108

134-
## Convert bitmap to integer array
109+
#### Convert bitmap to integer array
135110

136111
SELECT rb_to_array(bitmap) FROM t1 WHERE id = 1;
137112

138-
## Convert bitmap to SET of integers
113+
#### Convert bitmap to SET of integers
139114

140115
SELECT unnest(rb_to_array('{1,2,3}'::roaringbitmap));
141116

142117
or
143118

144119
SELECT rb_iterate('{1,2,3}'::roaringbitmap);
145120

146-
## Opperator List
121+
### Opperator List
147122
<table>
148123
<thead>
149124
<th>Opperator</th>
@@ -283,7 +258,7 @@ or
283258
</tr>
284259
</table>
285260

286-
## Function List
261+
### Function List
287262
<table>
288263
<thead>
289264
<th>Function</th>
@@ -457,7 +432,7 @@ or
457432
</tr>
458433
</table>
459434

460-
## Aggregation List
435+
### Aggregation List
461436
<table>
462437
<thead>
463438
<th>Function</th>
@@ -1039,12 +1014,12 @@ or
10391014
`pg_roaringbitmap` is supported by the following cloud vendors
10401015

10411016
- Alibaba Cloud RDS PostgreSQL: https://www.alibabacloud.com/help/doc-detail/142340.htm
1042-
- Huawei Cloud RDS PostgreSQL: https://support.huaweicloud.com/usermanual-rds/rds_09_0045.html
1017+
- Huawei Cloud RDS PostgreSQL: https://support.huaweicloud.com/usermanual-rds-pg/rds_09_0045.html
10431018
- Tencent Cloud RDS PostgreSQL: https://cloud.tencent.com/document/product/409/67299
1019+
- Google Cloud SQL: https://docs.cloud.google.com/sql/docs/postgres/extensions
10441020

10451021
To request support for `pg_roaringbitmap` from other cloud vendors, please see the following:
10461022

10471023
- Amazon RDS: send an email to [email protected] with the extension name and use case ([docs](https://aws.amazon.com/rds/postgresql/faqs/))
1048-
- Google Cloud SQL: comment on [this issue](https://issuetracker.google.com/u/1/issues/207403722)
10491024
- DigitalOcean Managed Databases: comment on [this idea](https://ideas.digitalocean.com/app-framework-services/p/postgres-extension-request-pgroaringbitmap)
10501025
- Azure Database for PostgreSQL: comment on [this post](https://feedback.azure.com/d365community/idea/e6f5ff90-da4b-ec11-a819-0022484bf651)

0 commit comments

Comments
 (0)