Skip to content

Commit 8b3bc03

Browse files
committed
Support PostgreSQL 19
code cleanly compiles and tests pass difference in tests output mainly caused by changes in Postgres error reporting.
1 parent 639c8d5 commit 8b3bc03

21 files changed

Lines changed: 177 additions & 159 deletions

.github/workflows/installcheck.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,34 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Get latest commit id of PostgreSQL 18
15+
- name: Get latest commit id of PostgreSQL 19
1616
run: |
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
17+
echo "PG_COMMIT_HASH=$(git ls-remote https://git.postgresql.org/git/postgresql.git refs/heads/master | awk '{print $1}')" >> $GITHUB_ENV
1818
19-
- name: Cache PostgreSQL 18
19+
- name: Cache PostgreSQL 19
2020
uses: actions/cache@v3
21-
id: pg18cache
21+
id: pg19cache
2222
with:
23-
path: ~/pg18
24-
key: ${{ runner.os }}-v1-pg18-${{ env.PG_COMMIT_HASH }}
23+
path: ~/pg19
24+
key: ${{ runner.os }}-v1-pg19-${{ env.PG_COMMIT_HASH }}
2525

2626
- name: Install necessary dependencies
2727
run: |
2828
sudo apt-get update
2929
sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison
3030
31-
- name: Install PostgreSQL 18 and some extensions
32-
if: steps.pg18cache.outputs.cache-hit != 'true'
31+
- name: Install PostgreSQL 19 and some extensions
32+
if: steps.pg19cache.outputs.cache-hit != 'true'
3333
run: |
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
34+
git clone --depth 1 --branch master https://git.postgresql.org/git/postgresql.git ~/pg19source
35+
cd ~/pg19source
36+
./configure --prefix=$HOME/pg19 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
3737
make install -j$(nproc) > /dev/null
3838
cd contrib
3939
cd fuzzystrmatch
40-
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
40+
make PG_CONFIG=$HOME/pg19/bin/pg_config install -j$(nproc) > /dev/null
4141
cd ../pg_trgm
42-
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
42+
make PG_CONFIG=$HOME/pg19/bin/pg_config install -j$(nproc) > /dev/null
4343
4444
- uses: actions/checkout@v3
4545
with:
@@ -48,19 +48,19 @@ jobs:
4848
- name: Build AGE
4949
id: build
5050
run: |
51-
make PG_CONFIG=$HOME/pg18/bin/pg_config COPT=-Werror install -j$(nproc)
51+
make PG_CONFIG=$HOME/pg19/bin/pg_config COPT=-Werror install -j$(nproc)
5252
5353
- name: Pull and build pgvector
5454
id: pgvector
5555
run: |
5656
git clone https://github.com/pgvector/pgvector.git
5757
cd pgvector
58-
make PG_CONFIG=$HOME/pg18/bin/pg_config install -j$(nproc) > /dev/null
58+
make PG_CONFIG=$HOME/pg19/bin/pg_config install -j$(nproc) > /dev/null
5959
6060
- name: Regression tests
6161
id: regression_tests
6262
run: |
63-
make PG_CONFIG=$HOME/pg18/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
63+
make PG_CONFIG=$HOME/pg19/bin/pg_config installcheck EXTRA_TESTS="pgvector fuzzystrmatch pg_trgm"
6464
continue-on-error: true
6565

6666
- name: Dump regression test errors

regress/expected/age_load.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ SELECT currval('agload_test_graph."Country_id_seq"')=248;
5555
-- Should error out on loading the same file again due to duplicate id
5656
SELECT load_labels_from_file('agload_test_graph', 'Country',
5757
'age_load/countries.csv', true);
58-
ERROR: Cannot insert duplicate vertex id: 844424930131970
59-
HINT: Entry id 2 is already used
58+
ERROR: duplicate key value violates unique constraint "Country_pkey"
59+
DETAIL: Key (id)=(844424930131970) already exists.
6060
--
6161
-- Load cities with id
6262
--
@@ -79,8 +79,8 @@ SELECT currval('agload_test_graph."City_id_seq"')=146941;
7979
-- Should error out on loading the same file again due to duplicate id
8080
SELECT load_labels_from_file('agload_test_graph', 'City',
8181
'age_load/cities.csv', true);
82-
ERROR: Cannot insert duplicate vertex id: 1125899906842777
83-
HINT: Entry id 153 is already used
82+
ERROR: duplicate key value violates unique constraint "City_pkey"
83+
DETAIL: Key (id)=(1125899906842777) already exists.
8484
--
8585
-- Load edges -- Connects cities to countries
8686
--

regress/expected/cypher_call.out

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ SELECT * FROM cypher('cypher_call', $$CALL ag_catalog.add_agtype(1,2)$$) as (sqr
8080
ERROR: function ag_catalog.add_agtype(agtype, agtype) does not exist
8181
LINE 2: ...cypher('cypher_call', $$CALL ag_catalog.add_agtype(1,2)$$) a...
8282
^
83-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
8483
/* CALL YIELD WHERE, should fail */
8584
SELECT * FROM cypher('cypher_call', $$CALL sqrt(64) YIELD sqrt WHERE sqrt > 1$$) as (sqrt agtype);
8685
ERROR: Cannot use standalone CALL with WHERE
@@ -287,12 +286,11 @@ SELECT * FROM cypher('cypher_call', $$ CALL ag_catalog.myfunc() YIELD myfunc RET
287286
ERROR: function ag_catalog.myfunc() does not exist
288287
LINE 1: ...T * FROM cypher('cypher_call', $$ CALL ag_catalog.myfunc() Y...
289288
^
290-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
289+
DETAIL: No function of that name accepts the given number of arguments.
291290
SELECT * FROM cypher('cypher_call', $$ CALL ag_catalog.myfunz(25) YIELD myfunc RETURN myfunc $$) as (result agtype);
292291
ERROR: function ag_catalog.myfunz(agtype) does not exist
293292
LINE 1: ...OM cypher('cypher_call', $$ CALL ag_catalog.myfunz(25) YIELD...
294293
^
295-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
296294
DROP FUNCTION myfunc;
297295
DROP SCHEMA call_stmt_test CASCADE;
298296
NOTICE: drop cascades to function call_stmt_test.add_agtype(agtype,agtype)

regress/expected/cypher_match.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,10 @@ SELECT * FROM cypher('cypher_match', $$
336336
$$) AS (i agtype);
337337
i
338338
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
339-
[{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex, {"id": 1970324836974594, "label": "e2", "end_id": 1688849860263937, "start_id": 1688849860263938, "properties": {}}::edge, {"id": 1688849860263937, "label": "v2", "properties": {"id": "initial"}}::vertex]::path
340339
[{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex, {"id": 1970324836974593, "label": "e2", "end_id": 1688849860263939, "start_id": 1688849860263938, "properties": {}}::edge, {"id": 1688849860263939, "label": "v2", "properties": {"id": "end"}}::vertex]::path
341340
[{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex, {"id": 1970324836974594, "label": "e2", "end_id": 1688849860263937, "start_id": 1688849860263938, "properties": {}}::edge, {"id": 1688849860263937, "label": "v2", "properties": {"id": "initial"}}::vertex]::path
342341
[{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex, {"id": 1970324836974593, "label": "e2", "end_id": 1688849860263939, "start_id": 1688849860263938, "properties": {}}::edge, {"id": 1688849860263939, "label": "v2", "properties": {"id": "end"}}::vertex]::path
342+
[{"id": 1688849860263938, "label": "v2", "properties": {"id": "middle"}}::vertex, {"id": 1970324836974594, "label": "e2", "end_id": 1688849860263937, "start_id": 1688849860263938, "properties": {}}::edge, {"id": 1688849860263937, "label": "v2", "properties": {"id": "initial"}}::vertex]::path
343343
(4 rows)
344344

345345
SELECT * FROM cypher('cypher_match', $$
@@ -1494,14 +1494,14 @@ AS (u agtype);
14941494
ERROR: function ag_catalog.age_isempty(agtype, agtype, agtype) does not exist
14951495
LINE 2: $$MATCH (u:for_pred) WHERE isEmpty(1,2,3) RETURN properties...
14961496
^
1497-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1497+
DETAIL: No function of that name accepts the given number of arguments.
14981498
SELECT * FROM cypher('for_isEmpty',
14991499
$$MATCH (u:for_pred) WHERE isEmpty() RETURN properties(u) $$)
15001500
AS (u agtype);
15011501
ERROR: function ag_catalog.age_isempty() does not exist
15021502
LINE 2: $$MATCH (u:for_pred) WHERE isEmpty() RETURN properties(u) $...
15031503
^
1504-
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
1504+
DETAIL: No function of that name accepts the given number of arguments.
15051505
-- clean up
15061506
SELECT drop_graph('for_isEmpty', true);
15071507
NOTICE: drop cascades to 3 other objects

0 commit comments

Comments
 (0)