Skip to content

Release 2.11 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ matrix:
- env: PGVERSION=9.6
- env: PGVERSION=10
- env: PGVERSION=11
allow_failures:
- env: PGVERSION=11
before_install:
- git clone -b v0.7.5 --depth 1 https://github.com/citusdata/tools.git
Expand Down
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2018-08-25
==========
v2.11 - Updated for PostgreSQL 11

2017-06-22
==========
v2.10.2 - Updated for PostgreSQL 10
Expand All @@ -8,20 +12,20 @@ v2.10.1 - Updated for PostgreSQL 9.4 and 9.5.

2014-01-10
==========
v2.10.0 - Merged [PR #17](https://github.com/aggregateknowledge/postgresql-hll/pull/17), cleaned up compiler warnings and test cruft, added binary IO type for hll.
v2.10.0 - Merged [PR #17](https://github.com/citusdata/postgresql-hll/pull/17), cleaned up compiler warnings and test cruft, added binary IO type for hll.

2013-12-16
==========
v2.9.0 - Fixed [issue #16](https://github.com/aggregateknowledge/postgresql-hll/issues/16), `bitstream_pack` fixed to write one byte at a time to avoid writing to unallocated memory.
v2.9.0 - Fixed [issue #16](https://github.com/citusdata/postgresql-hll/issues/16), `bitstream_pack` fixed to write one byte at a time to avoid writing to unallocated memory.

2013-07-16
==========
v2.8.0 - Fixed [issue #2](https://github.com/aggregateknowledge/postgresql-hll/issues/2), `hll_add_agg` now returns `hll_empty` on input of an empty set. (Thanks to @ozgune!)
v2.8.0 - Fixed [issue #2](https://github.com/citusdata/postgresql-hll/issues/2), `hll_add_agg` now returns `hll_empty` on input of an empty set. (Thanks to @ozgune!)

2013-06-12
==========
v2.7.1 - Build fixes for OS X and Debian. Documentation fixes. Small changes to test format to improve stability across `psql` versions.

2013-02-04
==========
v2.7 - First open-source release.
v2.7 - First open-source release.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
EXTENSION = hll
EXTVERSION = 2.10
EXTVERSIONS = 2.10 2.11

DATA_built = $(EXTENSION)--$(EXTVERSION).sql
DATA_built = $(foreach v,$(EXTVERSIONS),$(EXTENSION)--$(v).sql)
DATA = $(wildcard $(EXTENSION)--*--*.sql)

MODULE_big = $(EXTENSION)
Expand All @@ -33,4 +33,5 @@ src/hll.o: override CFLAGS += -std=c99

$(EXTENSION)--2.10.sql: $(EXTENSION).sql
cat $^ > $@

$(EXTENSION)--2.11.sql: $(EXTENSION)--2.10.sql $(EXTENSION)--2.10--2.11.sql
cat $^ > $@
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,23 +363,25 @@ Compatibility

This module has been tested on:

* **Postgres 9.0, 9.1, 9.2, 9.3, 9.4**
* **Postgres 9.4, 9.5, 9.6, 10, 11**

If you end up needing to change something to get this running on another system, send us the diff and we'll try to work it in!

Note: At the moment postgresql-hll does not wotk with 32bit systems.

Build
=====

## With `rpmbuild` ##

Specify versions:

export VER=2.10.0
export PGSHRT=93
export VER=2.11
export PGSHRT=11

Make sure `Makefile` points to the correct `pg_config` for the specified version, since `rpmbuild` doesn't respect env variables:

PG_CONFIG = /usr/pgsql-9.3/bin/pg_config
PG_CONFIG = /usr/pgsql-11/bin/pg_config

Create a tarball from the source tree:

Expand All @@ -392,18 +394,18 @@ Execute rpmbuild:

Install RPM:

rpm -Uv rpmbuild/RPMS/x86_64/postgresql91-hll-2.10.0-0.x86_64.rpm
rpm -Uv rpmbuild/RPMS/x86_64/postgresql11-hll-2.11.x86_64.rpm

And if you want the debugging build:

rpm -Uv rpmbuild/RPMS/x86_64/postgresql91-hll-debuginfo-2.10.0-0.x86_64.rpm
rpm -Uv rpmbuild/RPMS/x86_64/postgresql11-hll-debuginfo-2.11.x86_64.rpm


## From source ##

If you aren't using the `pg_config` on your path (or don't have it on your path), specify the correct one to build against:

PG_CONFIG=/usr/pgsql-9.3/bin/pg_config make
PG_CONFIG=/usr/pgsql-9.11/bin/pg_config make

Or to build with what's on your path, just:

Expand Down Expand Up @@ -437,28 +439,21 @@ And then just verify it's there:
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+-----------------------------------
hll | 2.10.0 | public | type for storing hyperloglog data
hll | 2.11 | public | type for storing hyperloglog data
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)

Tests
=====

Create the regression database:

psql -d postgres
CREATE DATABASE hll_regress;

Create the extension in the created database:
Start a PostgreSQL server running in default port:

psql -d hll_regress
CREATE EXTENSION hll;
pg_ctl -D data -l logfile -c start
initdb -D data

Run the regression:
Run the tests:

cd regress
make clean
make -j5
make installcheck

* * * * * * * * * * * * * * * * * * * * * * * * *

Expand Down
3 changes: 2 additions & 1 deletion expected/setup.out
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CREATE EXTENSION hll;
CREATE EXTENSION hll VERSION '2.10';
ALTER EXTENSION hll UPDATE TO '2.11';
40 changes: 40 additions & 0 deletions hll--2.10--2.11.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
DROP AGGREGATE hll_add_agg (hll_hashval);
DROP AGGREGATE hll_add_agg (hll_hashval, integer);
DROP AGGREGATE hll_add_agg (hll_hashval, integer, integer);
DROP AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint);
DROP AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint, integer);

CREATE AGGREGATE hll_add_agg (hll_hashval) (
SFUNC = hll_add_trans0,
STYPE = internal,
SSPACE = 131120,
FINALFUNC = hll_pack
);

CREATE AGGREGATE hll_add_agg (hll_hashval, integer) (
SFUNC = hll_add_trans1,
STYPE = internal,
SSPACE = 131120,
FINALFUNC = hll_pack
);

CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer) (
SFUNC = hll_add_trans2,
STYPE = internal,
SSPACE = 131120,
FINALFUNC = hll_pack
);

CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint) (
SFUNC = hll_add_trans3,
STYPE = internal,
SSPACE = 131120,
FINALFUNC = hll_pack
);

CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint, integer) (
SFUNC = hll_add_trans4,
STYPE = internal,
SSPACE = 131120,
FINALFUNC = hll_pack
);
2 changes: 1 addition & 1 deletion hll.control
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

# hll extension
comment = 'type for storing hyperloglog data'
default_version = '2.10'
default_version = '2.11'
module_pathname = '$libdir/hll'
6 changes: 0 additions & 6 deletions hll.sql
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ CREATE FUNCTION hll_ceil_card_unpacked(internal)
CREATE AGGREGATE hll_union_agg (hll) (
SFUNC = hll_union_trans,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);

Expand All @@ -476,38 +475,33 @@ CREATE AGGREGATE hll_union_agg (hll) (
CREATE AGGREGATE hll_add_agg (hll_hashval) (
SFUNC = hll_add_trans0,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);

-- Add aggregate function, returns hll.
CREATE AGGREGATE hll_add_agg (hll_hashval, integer) (
SFUNC = hll_add_trans1,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);

-- Add aggregate function, returns hll.
CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer) (
SFUNC = hll_add_trans2,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);

-- Add aggregate function, returns hll.
CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint) (
SFUNC = hll_add_trans3,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);

-- Add aggregate function, returns hll.
CREATE AGGREGATE hll_add_agg (hll_hashval, integer, integer, bigint, integer) (
SFUNC = hll_add_trans4,
STYPE = internal,
SSPACE = 131113,
FINALFUNC = hll_pack
);
3 changes: 2 additions & 1 deletion sql/setup.sql
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CREATE EXTENSION hll;
CREATE EXTENSION hll VERSION '2.10';
ALTER EXTENSION hll UPDATE TO '2.11';