diff --git a/.github/workflows/postgress12_16.yml b/.github/workflows/postgress12_16.yml index d08d2d7..2d71e30 100644 --- a/.github/workflows/postgress12_16.yml +++ b/.github/workflows/postgress12_16.yml @@ -181,3 +181,31 @@ jobs: name: Run bash script to verify image postgres:16-dev run: docker pull localhost:5000/postgres:16-dev && docker tag localhost:5000/postgres:16-dev postgres:16-dev && chmod +x ./postgres-16.sh && ./postgres-16.sh + PostgreSQL-17: + runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v4 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host + - + name: Build and push + uses: docker/build-push-action@v5 + with: + push: true + build-args: POSTGRES_VERSION=17 + file: Dockerfile_alpine + tags: localhost:5000/postgres:dev + - + name: Run bash script to verify image postgres:dev + run: docker pull localhost:5000/postgres:dev && docker tag localhost:5000/postgres:dev postgres:dev && chmod +x ./postgres-1x.sh && ./postgres-1x.sh diff --git a/.gitignore b/.gitignore index 69e6c2a..0bb42d5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.o *.so .vscode +.cache diff --git a/Dockerfile_alpine b/Dockerfile_alpine index daccee8..b467791 100644 --- a/Dockerfile_alpine +++ b/Dockerfile_alpine @@ -1,6 +1,6 @@ ARG POSTGRES_VERSION=16 -FROM postgres:$POSTGRES_VERSION-alpine3.18 as build +FROM postgres:$POSTGRES_VERSION-alpine as build ARG POSTGRES_VERSION=16 RUN apk update && apk add musl-dev icu-dev llvm15-dev clang15 make @@ -13,8 +13,8 @@ COPY pg_cjk_parser--0.0.1.sql /root/parser/ COPY zht2zhs.h /root/parser/ RUN make clean && make install -FROM postgres:$POSTGRES_VERSION-alpine3.18 +FROM postgres:$POSTGRES_VERSION-alpine COPY --from=build /root/parser/pg_cjk_parser.bc /usr/local/lib/postgresql/bitcode -COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql -COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension -COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension +COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql/ +COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension/ +COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension/ diff --git a/Readme.md b/Readme.md index b2cbb60..8bb2696 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ Postgres CJK Parser pg_cjk_parser is a fts (full text search) parser derived from the default parser in PostgreSQL. When a postgres database uses utf-8 encoding, this parser supports all the features of the default parser while splitting CJK (Chinese, Japanese, Korean) characters into 2-gram tokens. If the database's encoding is not utf-8, the parser behaves just like the default parser. -Now pg_cjk_parser supports PostgreSQL 12 to 16. +Now pg_cjk_parser supports PostgreSQL 11 to 17. ## Introduction diff --git a/pg_cjk_parser.c b/pg_cjk_parser.c index 7b99662..7dbeaed 100644 --- a/pg_cjk_parser.c +++ b/pg_cjk_parser.c @@ -3006,4 +3006,4 @@ prsd2_zht2zhs(PG_FUNCTION_ARGS) } PG_RETURN_TEXT_P(zhs_text); -} \ No newline at end of file +}