Skip to content

Commit 7b9bc67

Browse files
committed
Merge branch 'PG18' into merge_PG18_into_master
This will bring the master branch to PostgreSQL version 18 The following files were edited to reflect the master branch instead of the PG18 branch. modified: .github/workflows/go-driver.yml modified: .github/workflows/installcheck.yaml modified: .github/workflows/jdbc-driver.yaml modified: .github/workflows/nodejs-driver.yaml modified: .github/workflows/python-driver.yaml modified: drivers/docker-compose.yml modified: drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
2 parents 48fca83 + 3d54a1c commit 7b9bc67

File tree

18 files changed

+101
-53
lines changed

18 files changed

+101
-53
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+
PG18:
54+
required_pull_request_reviews:
55+
required_approving_review_count: 1
56+
5357
PG17:
5458
required_pull_request_reviews:
5559
required_approving_review_count: 1

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ PG16:
1919
PG17:
2020
- base-branch: 'PG17'
2121

22+
PG18:
23+
- base-branch: 'PG18'
24+
2225
master:
2326
- base-branch: 'master'

.github/workflows/installcheck.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Build / Regression
33
on:
44
push:
55
branches: [ "master" ]
6+
67
pull_request:
78
branches: [ "master" ]
89

@@ -11,53 +12,53 @@ jobs:
1112
runs-on: ubuntu-latest
1213

1314
steps:
14-
- name: Get latest commit id of PostgreSQL 17
15+
- name: Get latest commit id of PostgreSQL 18
1516
run: |
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
17+
echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/REL_18_STABLE | awk '{print $1}')" >> $GITHUB_ENV
1718
18-
- name: Cache PostgreSQL 17
19+
- name: Cache PostgreSQL 18
1920
uses: actions/cache@v3
20-
id: pg17cache
21+
id: pg18cache
2122
with:
22-
path: ~/pg17
23-
key: ${{ runner.os }}-v1-pg17-${{ env.PG_COMMIT_HASH }}
23+
path: ~/pg18
24+
key: ${{ runner.os }}-v1-pg18-${{ env.PG_COMMIT_HASH }}
2425

2526
- name: Install necessary dependencies
2627
run: |
2728
sudo apt-get update
2829
sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison
2930
30-
- name: Install PostgreSQL 17 and some extensions
31-
if: steps.pg17cache.outputs.cache-hit != 'true'
31+
- name: Install PostgreSQL 18 and some extensions
32+
if: steps.pg18cache.outputs.cache-hit != 'true'
3233
run: |
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
34+
git clone --depth 1 --branch REL_18_STABLE https://git.postgresql.org/git/postgresql.git ~/pg18source
35+
cd ~/pg18source
36+
./configure --prefix=$HOME/pg18 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
3637
make install -j$(nproc) > /dev/null
3738
cd contrib
3839
cd fuzzystrmatch
39-
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
40+
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
4041
cd ../pg_trgm
41-
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
42+
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
4243
4344
- uses: actions/checkout@v3
4445

4546
- name: Build AGE
4647
id: build
4748
run: |
48-
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc)
49+
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc)
4950
5051
- name: Pull and build pgvector
5152
id: pgvector
5253
run: |
5354
git clone https://github.com/pgvector/pgvector.git
5455
cd pgvector
55-
make PG_CONFIG=$HOME/pg17/bin/pg_config install -j$(nproc) > /dev/null
56+
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
5657
5758
- name: Regression tests
5859
id: regression_tests
5960
run: |
60-
make PG_CONFIG=$HOME/pg17/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
61+
make PG_CONFIG=$HOME/pg18/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
6162
continue-on-error: true
6263

6364
- name: Dump regression test errors

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:17 AS build
20+
FROM postgres:18 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-17
27+
postgresql-server-dev-18
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:17
37+
FROM postgres:18
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/17/lib/age.so /usr/lib/postgresql/17/lib/
52-
COPY --from=build /usr/share/postgresql/17/extension/age--1.6.0.sql /usr/share/postgresql/17/extension/
53-
COPY --from=build /usr/share/postgresql/17/extension/age.control /usr/share/postgresql/17/extension/
51+
COPY --from=build /usr/lib/postgresql/18/lib/age.so /usr/lib/postgresql/18/lib/
52+
COPY --from=build /usr/share/postgresql/18/extension/age--1.6.0.sql /usr/share/postgresql/18/extension/
53+
COPY --from=build /usr/share/postgresql/18/extension/age.control /usr/share/postgresql/18/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:17
20+
FROM postgres:18
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-17 \
27+
postgresql-server-dev-18 \
2828
locales
2929

3030
ENV LANG=en_US.UTF-8

regress/expected/cypher_match.out

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ SELECT * FROM cypher('cypher_match', $$
348348
$$) AS (i agtype);
349349
i
350350
----------------------------------------------------------------------------------
351-
{"id": 1688849860263939, "label": "v2", "properties": {"id": "end"}}::vertex
352-
{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex
353351
{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex
352+
{"id": 1688849860263939, "label": "v2", "properties": {"id": "end"}}::vertex
354353
{"id": 1688849860263937, "label": "v2", "properties": {"id": "initial"}}::vertex
354+
{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex
355355
(4 rows)
356356

357357
SELECT * FROM cypher('cypher_match', $$
@@ -537,18 +537,18 @@ SELECT * FROM cypher('cypher_match', $$
537537
$$) AS (i agtype, b agtype, c agtype);
538538
i | b | c
539539
---+-----------+-----------
540-
| "end" | "middle"
541-
0 | "end" | "middle"
542-
1 | "end" | "middle"
543540
| "middle" | "end"
544541
0 | "middle" | "end"
545542
1 | "middle" | "end"
546-
| "middle" | "initial"
547-
0 | "middle" | "initial"
548-
1 | "middle" | "initial"
543+
| "end" | "middle"
544+
0 | "end" | "middle"
545+
1 | "end" | "middle"
549546
| "initial" | "middle"
550547
0 | "initial" | "middle"
551548
1 | "initial" | "middle"
549+
| "middle" | "initial"
550+
0 | "middle" | "initial"
551+
1 | "middle" | "initial"
552552
(12 rows)
553553

554554
SELECT * FROM cypher('cypher_match', $$
@@ -558,18 +558,18 @@ SELECT * FROM cypher('cypher_match', $$
558558
$$) AS (i agtype, c agtype);
559559
i | c
560560
---+-----------
561-
| "middle"
562-
0 | "middle"
563-
1 | "middle"
564561
| "end"
565562
0 | "end"
566563
1 | "end"
567-
| "initial"
568-
0 | "initial"
569-
1 | "initial"
570564
| "middle"
571565
0 | "middle"
572566
1 | "middle"
567+
| "middle"
568+
0 | "middle"
569+
1 | "middle"
570+
| "initial"
571+
0 | "initial"
572+
1 | "initial"
573573
(12 rows)
574574

575575
--
@@ -2421,8 +2421,8 @@ SELECT * FROM cypher('cypher_match', $$ MATCH p=(a)-[u {relationship: u.relation
24212421
SELECT * FROM cypher('cypher_match', $$ MATCH p=(a {name:a.name})-[u {relationship: u.relationship}]->(b {age:b.age}) RETURN p $$) as (a agtype);
24222422
a
24232423
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2424-
[{"id": 281474976710659, "label": "", "properties": {"age": 3, "name": "orphan"}}::vertex, {"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge, {"id": 281474976710666, "label": "", "properties": {"age": 6}}::vertex]::path
24252424
[{"id": 281474976710661, "label": "", "properties": {"age": 4, "name": "T"}}::vertex, {"id": 4785074604081153, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710661, "properties": {"years": 3, "relationship": "friends"}}::edge, {"id": 281474976710666, "label": "", "properties": {"age": 6}}::vertex]::path
2425+
[{"id": 281474976710659, "label": "", "properties": {"age": 3, "name": "orphan"}}::vertex, {"id": 4785074604081154, "label": "knows", "end_id": 281474976710666, "start_id": 281474976710659, "properties": {"years": 4, "relationship": "enemies"}}::edge, {"id": 281474976710666, "label": "", "properties": {"age": 6}}::vertex]::path
24262426
(2 rows)
24272427

24282428
SELECT * FROM cypher('cypher_match', $$ CREATE () WITH * MATCH (x{n0:x.n1}) RETURN 0 $$) as (a agtype);

src/backend/catalog/ag_label.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "access/genam.h"
2323
#include "catalog/indexing.h"
24+
#include "executor/executor.h"
2425
#include "nodes/makefuncs.h"
2526
#include "utils/builtins.h"
2627
#include "utils/lsyscache.h"

src/backend/executor/cypher_create.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include "postgres.h"
2121

22+
#include "executor/executor.h"
23+
2224
#include "catalog/ag_label.h"
2325
#include "executor/cypher_executor.h"
2426
#include "executor/cypher_utils.h"

src/backend/executor/cypher_delete.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "postgres.h"
2121

22+
#include "executor/executor.h"
2223
#include "storage/bufmgr.h"
2324
#include "common/hashfn.h"
2425

@@ -257,7 +258,7 @@ static agtype_value *extract_entity(CustomScanState *node,
257258
tupleDescriptor = scanTupleSlot->tts_tupleDescriptor;
258259

259260
/* type checking, make sure the entity is an agtype vertex or edge */
260-
if (tupleDescriptor->attrs[entity_position -1].atttypid != AGTYPEOID)
261+
if (TupleDescAttr(tupleDescriptor, entity_position -1)->atttypid != AGTYPEOID)
261262
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
262263
errmsg("DELETE clause can only delete agtype")));
263264

src/backend/executor/cypher_merge.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include "postgres.h"
2121

22+
#include "executor/executor.h"
23+
2224
#include "catalog/ag_label.h"
2325
#include "executor/cypher_executor.h"
2426
#include "executor/cypher_utils.h"

0 commit comments

Comments
 (0)