Skip to content

Commit 2f05474

Browse files
committed
Merge branch 'PG17' into master_to_PostgreSQL17
Conflicts: .asf.yaml .github/workflows/installcheck.yaml Changes to be committed: modified: .asf.yaml modified: .github/labeler.yml modified: .github/workflows/installcheck.yaml modified: README.md modified: docker/Dockerfile modified: docker/Dockerfile.dev modified: drivers/docker-compose.yml modified: src/backend/nodes/ag_nodes.c modified: src/backend/parser/cypher_analyze.c
2 parents 1277b82 + d38b2bd commit 2f05474

File tree

9 files changed

+51
-35
lines changed

9 files changed

+51
-35
lines changed

.asf.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ github:
5050
required_pull_request_reviews:
5151
required_approving_review_count: 1
5252

53+
PG17:
54+
required_pull_request_reviews:
55+
required_approving_review_count: 2
56+
5357
PG16:
5458
required_pull_request_reviews:
5559
required_approving_review_count: 1

.github/labeler.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@ PG14:
1313
PG15:
1414
- base-branch: 'PG15'
1515

16+
PG16:
17+
- base-branch: 'PG16'
18+
19+
PG17:
20+
- base-branch: 'PG17'
21+
1622
master:
17-
- base-branch: 'master'
23+
- base-branch: 'master'

.github/workflows/installcheck.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,53 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Get latest commit id of PostgreSQL 16
14+
- name: Get latest commit id of PostgreSQL 17
1515
run: |
16-
echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_16_STABLE | awk '{print $1}')" >> $GITHUB_ENV
16+
echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_17_STABLE | awk '{print $1}')" >> $GITHUB_ENV
1717
18-
- name: Cache PostgreSQL 16
18+
- name: Cache PostgreSQL 17
1919
uses: actions/cache@v3
20-
id: pg16cache
20+
id: pg17cache
2121
with:
22-
path: ~/pg16
23-
key: ${{ runner.os }}-v1-pg16-${{ env.PG_COMMIT_HASH }}
22+
path: ~/pg17
23+
key: ${{ runner.os }}-v1-pg17-${{ env.PG_COMMIT_HASH }}
2424

2525
- name: Install necessary dependencies
2626
run: |
2727
sudo apt-get update
2828
sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison
2929
30-
- name: Install PostgreSQL 16 and some extensions
31-
if: steps.pg16cache.outputs.cache-hit != 'true'
30+
- name: Install PostgreSQL 17 and some extensions
31+
if: steps.pg17cache.outputs.cache-hit != 'true'
3232
run: |
33-
git clone --depth 1 --branch REL_16_STABLE https://git.postgresql.org/git/postgresql.git ~/pg16source
34-
cd ~/pg16source
35-
./configure --prefix=$HOME/pg16 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
33+
git clone --depth 1 --branch REL_17_STABLE https://git.postgresql.org/git/postgresql.git ~/pg17source
34+
cd ~/pg17source
35+
./configure --prefix=$HOME/pg17 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
3636
make install -j$(nproc) > /dev/null
3737
cd contrib
3838
cd fuzzystrmatch
39-
make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null
39+
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
4040
cd ../pg_trgm
41-
make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null
41+
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
4242
4343
- uses: actions/checkout@v3
4444

4545
- name: Build AGE
4646
id: build
4747
run: |
48-
make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc)
49-
48+
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc)
49+
5050
- name: Pull and build pgvector
5151
id: pgvector
5252
run: |
5353
git clone https://github.com/pgvector/pgvector.git
5454
cd pgvector
55-
make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc) > /dev/null
55+
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
5656
5757
- name: Regression tests
5858
id: regression_tests
5959
run: |
60-
make PG_CONFIG=$HOME/pg16/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
60+
make PG_CONFIG=$HOME/pg17/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
6161
continue-on-error: true
6262

6363
- name: Dump regression test errors

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<img src="https://img.shields.io/badge/Release-v1.5.0-FFA500?labelColor=gray&style=flat&link=https://github.com/apache/age/releases"/>
3434
</a>
3535
&nbsp;
36-
<a href="https://www.postgresql.org/docs/16/index.html">
37-
<img src="https://img.shields.io/badge/Version-Postgresql 16-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/16/index.html"/>
36+
<a href="https://www.postgresql.org/docs/17/index.html">
37+
<img src="https://img.shields.io/badge/Version-Postgresql 17-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/17/index.html"/>
3838
</a>
3939
&nbsp;
4040
<a href="https://github.com/apache/age/issues">
@@ -125,7 +125,7 @@ Apache AGE is intended to be simple to install and run. It can be installed with
125125
&nbsp;Install PostgreSQL
126126
</h4>
127127

128-
You will need to install an AGE compatible version of Postgres<a>, for now AGE supports Postgres 11, 12, 13, 14, 15 & 16. Supporting the latest versions is on AGE roadmap.
128+
You will need to install an AGE compatible version of Postgres<a>, for now AGE supports Postgres 11, 12, 13, 14, 15, 16 & 17. Supporting the latest versions is on AGE roadmap.
129129

130130
<h4>
131131
&nbsp;Installation via Package Manager
@@ -143,7 +143,7 @@ sudo apt install postgresql
143143
&nbsp;Installation From Source Code
144144
</h4>
145145

146-
You can <a href="https://www.postgresql.org/ftp/source/"> download the Postgres </a> 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 <a href="https://www.postgresql.org/docs/16/installation.html">official Postgres Website.</a>
146+
You can <a href="https://www.postgresql.org/ftp/source/"> download the Postgres </a> 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 <a href="https://www.postgresql.org/docs/17/installation.html">official Postgres Website.</a>
147147

148148

149149

@@ -152,7 +152,7 @@ You can <a href="https://www.postgresql.org/ftp/source/"> download the Postgres
152152

153153
Clone the <a href="https://github.com/apache/age">github repository</a> or download the <a href="https://github.com/apache/age/releases">download an official release.
154154
</a>
155-
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.
155+
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.
156156
<br>
157157

158158
```bash

docker/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#
1818

1919
# Build stage: Install necessary development tools for compilation and installation
20-
FROM postgres:16 AS build
20+
FROM postgres:17 AS build
2121

2222
RUN apt-get update \
2323
&& apt-get install -y --no-install-recommends --no-install-suggests \
2424
bison \
2525
build-essential \
2626
flex \
27-
postgresql-server-dev-16
27+
postgresql-server-dev-17
2828

2929
COPY . /age
3030

@@ -34,7 +34,7 @@ RUN make && make install
3434

3535

3636
# Final stage: Create a final image by copying the files created in the build stage
37-
FROM postgres:16
37+
FROM postgres:17
3838

3939
RUN apt-get update \
4040
&& apt-get install -y --no-install-recommends --no-install-suggests \
@@ -48,9 +48,9 @@ ENV LANG=en_US.UTF-8
4848
ENV LC_COLLATE=en_US.UTF-8
4949
ENV LC_CTYPE=en_US.UTF-8
5050

51-
COPY --from=build /usr/lib/postgresql/16/lib/age.so /usr/lib/postgresql/16/lib/
52-
COPY --from=build /usr/share/postgresql/16/extension/age--1.5.0.sql /usr/share/postgresql/16/extension/
53-
COPY --from=build /usr/share/postgresql/16/extension/age.control /usr/share/postgresql/16/extension/
51+
COPY --from=build /usr/lib/postgresql/17/lib/age.so /usr/lib/postgresql/17/lib/
52+
COPY --from=build /usr/share/postgresql/17/extension/age--1.5.0.sql /usr/share/postgresql/17/extension/
53+
COPY --from=build /usr/share/postgresql/17/extension/age.control /usr/share/postgresql/17/extension/
5454
COPY docker/docker-entrypoint-initdb.d/00-create-extension-age.sql /docker-entrypoint-initdb.d/00-create-extension-age.sql
5555

5656
CMD ["postgres", "-c", "shared_preload_libraries=age"]

docker/Dockerfile.dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
#
1818

1919

20-
FROM postgres:16
20+
FROM postgres:17
2121

2222
RUN apt-get update
2323
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
2424
bison \
2525
build-essential \
2626
flex \
27-
postgresql-server-dev-16 \
27+
postgresql-server-dev-17 \
2828
locales
2929

3030
ENV LANG=en_US.UTF-8

drivers/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3.3"
22
services:
33
db:
4-
image: apache/age:dev_snapshot_master
4+
image: apache/age:dev_snapshot_PG17
55
environment:
66
- POSTGRES_USER=postgres
77
- POSTGRES_PASSWORD=agens

src/backend/nodes/ag_nodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ExtensibleNode *_new_ag_node(Size size, ag_node_tag tag)
158158
{
159159
ExtensibleNode *n;
160160

161-
n = (ExtensibleNode *)palloc0fast(size);
161+
n = (ExtensibleNode *)palloc0(size);
162162
n->type = T_ExtensibleNode;
163163
n->extnodename = node_names[tag];
164164

src/backend/parser/cypher_analyze.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,17 @@ static bool convert_cypher_walker(Node *node, ParseState *pstate)
168168
* OpExpr - expression node for an operator invocation
169169
* Const - constant value or expression node
170170
* BoolExpr - expression node for the basic Boolean operators AND, OR, NOT
171+
* JsonConstructorExpr - wrapper over FuncExpr/Aggref/WindowFunc for
172+
* SQL/JSON constructors
171173
*
172174
* These are a special case that needs to be ignored.
173175
*
174176
*/
175177
if (IsA(funcexpr, SQLValueFunction)
176178
|| IsA(funcexpr, CoerceViaIO)
177179
|| IsA(funcexpr, Var) || IsA(funcexpr, OpExpr)
178-
|| IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr))
180+
|| IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr)
181+
|| IsA(funcexpr, JsonConstructorExpr))
179182
{
180183
return false;
181184
}
@@ -340,14 +343,17 @@ static bool is_func_cypher(FuncExpr *funcexpr)
340343
* OpExpr - expression node for an operator invocation
341344
* Const - constant value or expression node
342345
* BoolExpr - expression node for the basic Boolean operators AND, OR, NOT
346+
* JsonConstructorExpr - wrapper over FuncExpr/Aggref/WindowFunc for
347+
* SQL/JSON constructors
343348
*
344349
* These are a special case that needs to be ignored.
345350
*
346351
*/
347352
if (IsA(funcexpr, SQLValueFunction)
348353
|| IsA(funcexpr, CoerceViaIO)
349354
|| IsA(funcexpr, Var) || IsA(funcexpr, OpExpr)
350-
|| IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr))
355+
|| IsA(funcexpr, Const) || IsA(funcexpr, BoolExpr)
356+
|| IsA(funcexpr, JsonConstructorExpr))
351357
{
352358
return false;
353359
}

0 commit comments

Comments
 (0)