Skip to content

Commit

Permalink
Add pguint
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanlonel committed Aug 22, 2023
1 parent de6a93f commit 8d112d6
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
32 changes: 29 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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="" && \
Expand Down Expand Up @@ -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/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions tests/create_extensions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 8d112d6

Please sign in to comment.