From af19d6685e0d30811665c2cdf761880f20f63ce9 Mon Sep 17 00:00:00 2001 From: ivanlonel Date: Wed, 6 Dec 2023 13:32:46 -0300 Subject: [PATCH] Add pguint --- Dockerfile | 18 ++++++++++++++++++ README.md | 1 + tests/create_extensions.sql | 12 ++++++++++++ 3 files changed, 31 insertions(+) diff --git a/Dockerfile b/Dockerfile index c34a83f..a3acca1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,6 +89,17 @@ RUN apt-get install -y --no-install-recommends pgxnclient && \ +FROM common-deps as build-pguint + +WORKDIR /tmp/pguint +RUN ASSET_NAME=$(basename $(curl -LIs -o /dev/null -w %{url_effective} https://github.com/petere/pguint/releases/latest)) && \ + curl --fail -L "https://github.com/petere/pguint/archive/${ASSET_NAME}.tar.gz" | tar -zx --strip-components=1 -C . && \ + make && \ + make install + + + + FROM common-deps as build-sqlite_fdw WORKDIR /tmp/sqlite_fdw @@ -238,6 +249,13 @@ COPY --from=build-timescaledb \ /usr/lib/postgresql/$PG_MAJOR/lib/timescaledb* \ /usr/lib/postgresql/$PG_MAJOR/lib/ +COPY --from=build-pguint \ + /usr/share/postgresql/$PG_MAJOR/extension/uint* \ + /usr/share/postgresql/$PG_MAJOR/extension/ +COPY --from=build-pguint \ + /usr/lib/postgresql/$PG_MAJOR/lib/uint* \ + /usr/lib/postgresql/$PG_MAJOR/lib/ + COPY --from=build-sqlite_fdw \ /usr/share/postgresql/$PG_MAJOR/extension/sqlite_fdw* \ /usr/share/postgresql/$PG_MAJOR/extension/ diff --git a/README.md b/README.md index db179e8..0dc82da 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ For more detailed instructions about how to start and control your Postgres cont - [pgq_node](https://github.com/pgq/pgq-node) - [pgrouting](https://github.com/pgRouting/pgrouting) - [pgtap](https://github.com/theory/pgtap) +- [pguint](https://github.com/petere/pguint) - [pgvector](https://github.com/pgvector/pgvector) - [pg_cron](https://github.com/citusdata/pg_cron) - [pg_dirtyread](https://github.com/df7cb/pg_dirtyread) diff --git a/tests/create_extensions.sql b/tests/create_extensions.sql index 46f0777..b05d897 100644 --- a/tests/create_extensions.sql +++ b/tests/create_extensions.sql @@ -576,6 +576,18 @@ SELECT ok(TRUE); SELECT * FROM finish(); +-- https://github.com/petere/pguint +CREATE EXTENSION uint; +CREATE TABLE uint_test ( + i1 int1, -- signed 8-bit integer + u1 uint1, -- unsigned 8-bit integer + u2 uint2, -- unsigned 16-bit integer + u4 uint4, -- unsigned 32-bit integer + u8 uint8 -- unsigned 64-bit integer +); +INSERT INTO uint_test VALUES (-128, 0, 0, 0, 0), (127, 255, 65535, 4294967295, 18446744073709551615); + + -- https://github.com/pgvector/pgvector CREATE EXTENSION vector; CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));