Skip to content

Commit

Permalink
Add pguint
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanlonel committed Dec 6, 2023
1 parent 6e38d9b commit a20c97b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,31 @@ 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-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)
WORKDIR /tmp/pgvector
RUN make clean && \
make OPTFLAGS="" && \
make install




FROM common-deps as build-sqlite_fdw

WORKDIR /tmp/sqlite_fdw
Expand Down Expand Up @@ -238,6 +263,20 @@ 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-pgvector \
/usr/share/postgresql/$PG_MAJOR/extension/vector* \
/usr/share/postgresql/$PG_MAJOR/extension/
COPY --from=build-pgvector \
/usr/lib/postgresql/$PG_MAJOR/lib/vector* \
/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/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions tests/create_extensions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a20c97b

Please sign in to comment.