diff --git a/Dockerfile b/Dockerfile index addce92..b9952e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,12 +55,31 @@ RUN make && \ -FROM common-deps as build-pgvector +FROM common-deps as git-deps + +RUN apt-get install -y --no-install-recommends git + + + + +FROM git-deps as build-pguint + +WORKDIR /tmp +ARG REPO=https://github.com/petere/pguint +RUN git clone $REPO --single-branch --branch $(git ls-remote --tags --refs $REPO | tail -n1 | cut -d/ -f3) +WORKDIR /tmp/pguint +RUN make clean && \ + make && \ + make install + + + + +FROM git-deps as build-pgvector WORKDIR /tmp ARG REPO=https://github.com/pgvector/pgvector.git -RUN apt-get install -y --no-install-recommends git && \ - git clone $REPO --single-branch --branch $(git ls-remote --tags --refs $REPO | tail -n1 | cut -d/ -f3) +RUN git clone $REPO --single-branch --branch $(git ls-remote --tags --refs $REPO | tail -n1 | cut -d/ -f3) WORKDIR /tmp/pgvector RUN make clean && \ make OPTFLAGS="" && \ @@ -208,6 +227,13 @@ COPY --from=build-pgvector \ /usr/lib/postgresql/$PG_MAJOR/lib/vector* \ /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 e3d7a52..f57354b 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,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 9b72000..ef29282 100644 --- a/tests/create_extensions.sql +++ b/tests/create_extensions.sql @@ -564,6 +564,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));