diff --git a/.asf.yaml b/.asf.yaml index 071b3cd64..da422d3bd 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -50,6 +50,10 @@ github: required_pull_request_reviews: required_approving_review_count: 1 + PG17: + required_pull_request_reviews: + required_approving_review_count: 2 + PG16: required_pull_request_reviews: required_approving_review_count: 1 diff --git a/.github/labeler.yml b/.github/labeler.yml index 92ab6db8e..6baa297c5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -13,5 +13,11 @@ PG14: PG15: - base-branch: 'PG15' +PG16: +- base-branch: 'PG16' + +PG17: +- base-branch: 'PG17' + master: -- base-branch: 'master' \ No newline at end of file +- base-branch: 'master' diff --git a/.github/workflows/installcheck.yaml b/.github/workflows/installcheck.yaml index daa58e7f1..da266f0da 100644 --- a/.github/workflows/installcheck.yaml +++ b/.github/workflows/installcheck.yaml @@ -11,53 +11,53 @@ jobs: runs-on: ubuntu-latest steps: - - name: Get latest commit id of PostgreSQL 16 + - name: Get latest commit id of PostgreSQL 17 run: | - echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_16_STABLE | awk '{print $1}')" >> $GITHUB_ENV + echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_17_STABLE | awk '{print $1}')" >> $GITHUB_ENV - - name: Cache PostgreSQL 16 + - name: Cache PostgreSQL 17 uses: actions/cache@v3 - id: pg16cache + id: pg17cache with: - path: ~/pg16 - key: ${{ runner.os }}-v1-pg16-${{ env.PG_COMMIT_HASH }} + path: ~/pg17 + key: ${{ runner.os }}-v1-pg17-${{ env.PG_COMMIT_HASH }} - name: Install necessary dependencies run: | sudo apt-get update sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison - - name: Install PostgreSQL 16 and some extensions - if: steps.pg16cache.outputs.cache-hit != 'true' + - name: Install PostgreSQL 17 and some extensions + if: steps.pg17cache.outputs.cache-hit != 'true' run: | - git clone --depth 1 --branch REL_16_STABLE https://git.postgresql.org/git/postgresql.git ~/pg16source - cd ~/pg16source - ./configure --prefix=$HOME/pg16 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert + git clone --depth 1 --branch REL_17_STABLE https://git.postgresql.org/git/postgresql.git ~/pg17source + cd ~/pg17source + ./configure --prefix=$HOME/pg17 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert make install -j$(nproc) > /dev/null cd contrib cd fuzzystrmatch - make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null + make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null cd ../pg_trgm - make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null + make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null - uses: actions/checkout@v3 - name: Build AGE id: build run: | - make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) - + make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) + - name: Pull and build pgvector id: pgvector run: | git clone https://github.com/pgvector/pgvector.git cd pgvector - make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null + make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null - name: Regression tests id: regression_tests run: | - make PG_CONFIG=$HOME/pg16/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm" + make PG_CONFIG=$HOME/pg17/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm" continue-on-error: true - name: Dump regression test errors diff --git a/README.md b/README.md index a89c6f65a..613a6643c 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@   - - + +   @@ -125,7 +125,7 @@ Apache AGE is intended to be simple to install and run. It can be installed with  Install PostgreSQL -You will need to install an AGE compatible version of Postgres, for now AGE supports Postgres 11, 12, 13, 14, 15 & 16. Supporting the latest versions is on AGE roadmap. +You will need to install an AGE compatible version of Postgres, for now AGE supports Postgres 11, 12, 13, 14, 15, 16 & 17. Supporting the latest versions is on AGE roadmap.

 Installation via Package Manager @@ -143,7 +143,7 @@ sudo apt install postgresql  Installation From Source Code

-You can
download the Postgres source code and install your own instance of Postgres. You can read instructions on how to install from source code for different versions on the official Postgres Website. +You can download the Postgres source code and install your own instance of Postgres. You can read instructions on how to install from source code for different versions on the official Postgres Website. @@ -152,7 +152,7 @@ You can download the Postgres Clone the github repository or download the download an official release. -Run the pg_config utility and check the version of PostgreSQL. Currently, only PostgreSQL versions 11, 12, 13, 14, 15 & 16 are supported. If you have any other version of Postgres, you will need to install PostgreSQL version 11, 12, 13, 14, 15, or 16. +Run the pg_config utility and check the version of PostgreSQL. Currently, only PostgreSQL versions 11, 12, 13, 14, 15, 16 & 17 are supported. If you have any other version of Postgres, you will need to install PostgreSQL version 11, 12, 13, 14, 15, 16 & 17.
```bash diff --git a/docker/Dockerfile b/docker/Dockerfile index 336070589..91c626d63 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,14 +17,14 @@ # # Build stage: Install necessary development tools for compilation and installation -FROM postgres:16 AS build +FROM postgres:17 AS build RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ bison \ build-essential \ flex \ - postgresql-server-dev-16 + postgresql-server-dev-17 COPY . /age @@ -34,7 +34,7 @@ RUN make && make install # Final stage: Create a final image by copying the files created in the build stage -FROM postgres:16 +FROM postgres:17 RUN apt-get update \ && apt-get install -y --no-install-recommends --no-install-suggests \ @@ -48,9 +48,9 @@ ENV LANG=en_US.UTF-8 ENV LC_COLLATE=en_US.UTF-8 ENV LC_CTYPE=en_US.UTF-8 -COPY --from=build /usr/lib/postgresql/16/lib/age.so /usr/lib/postgresql/16/lib/ -COPY --from=build /usr/share/postgresql/16/extension/age--1.5.0.sql /usr/share/postgresql/16/extension/ -COPY --from=build /usr/share/postgresql/16/extension/age.control /usr/share/postgresql/16/extension/ +COPY --from=build /usr/lib/postgresql/17/lib/age.so /usr/lib/postgresql/17/lib/ +COPY --from=build /usr/share/postgresql/17/extension/age--1.5.0.sql /usr/share/postgresql/17/extension/ +COPY --from=build /usr/share/postgresql/17/extension/age.control /usr/share/postgresql/17/extension/ COPY docker/docker-entrypoint-initdb.d/00-create-extension-age.sql /docker-entrypoint-initdb.d/00-create-extension-age.sql CMD ["postgres", "-c", "shared_preload_libraries=age"] diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index bdf0c40d0..48b2db3ed 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -17,14 +17,14 @@ # -FROM postgres:16 +FROM postgres:17 RUN apt-get update RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \ bison \ build-essential \ flex \ - postgresql-server-dev-16 \ + postgresql-server-dev-17 \ locales ENV LANG=en_US.UTF-8 diff --git a/src/backend/nodes/ag_nodes.c b/src/backend/nodes/ag_nodes.c index 9cab568d2..7aaaecaa5 100644 --- a/src/backend/nodes/ag_nodes.c +++ b/src/backend/nodes/ag_nodes.c @@ -158,7 +158,7 @@ ExtensibleNode *_new_ag_node(Size size, ag_node_tag tag) { ExtensibleNode *n; - n = (ExtensibleNode *)palloc0fast(size); + n = (ExtensibleNode *)palloc0(size); n->type = T_ExtensibleNode; n->extnodename = node_names[tag]; diff --git a/src/backend/parser/cypher_analyze.c b/src/backend/parser/cypher_analyze.c index d53fba3ef..af3e83c87 100644 --- a/src/backend/parser/cypher_analyze.c +++ b/src/backend/parser/cypher_analyze.c @@ -168,6 +168,8 @@ static bool convert_cypher_walker(Node *node, ParseState *pstate) * OpExpr - expression node for an operator invocation * Const - constant value or expression node * BoolExpr - expression node for the basic Boolean operators AND, OR, NOT + * JsonConstructorExpr - wrapper over FuncExpr/Aggref/WindowFunc for + * SQL/JSON constructors * * These are a special case that needs to be ignored. * @@ -175,7 +177,8 @@ static bool convert_cypher_walker(Node *node, ParseState *pstate) if (IsA(funcexpr, SQLValueFunction) || IsA(funcexpr, CoerceViaIO) || IsA(funcexpr, Var) || IsA(funcexpr, OpExpr) - || IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr)) + || IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr) + || IsA(funcexpr, JsonConstructorExpr)) { return false; } @@ -340,6 +343,8 @@ static bool is_func_cypher(FuncExpr *funcexpr) * OpExpr - expression node for an operator invocation * Const - constant value or expression node * BoolExpr - expression node for the basic Boolean operators AND, OR, NOT + * JsonConstructorExpr - wrapper over FuncExpr/Aggref/WindowFunc for + * SQL/JSON constructors * * These are a special case that needs to be ignored. * @@ -347,7 +352,8 @@ static bool is_func_cypher(FuncExpr *funcexpr) if (IsA(funcexpr, SQLValueFunction) || IsA(funcexpr, CoerceViaIO) || IsA(funcexpr, Var) || IsA(funcexpr, OpExpr) - || IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr)) + || IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr) + || IsA(funcexpr, JsonConstructorExpr)) { return false; }