Skip to content

Commit f88e6d1

Browse files
jrgemignaniMuhammadTahaNaveedmuhammadshoaibpanosfolMatheusFarias03
authored
Master to PostgreSQL version 15 (#1123)
PR for moving the master branch up to PostgreSQL 15. Contains all of the latest work in the master branch in addition to all of the changes made to go from PostgreSQL version 14 to 15. --------- Co-authored-by: John Gemignani <[email protected]> Co-authored-by: Muhammad Taha Naveed <[email protected]> Co-authored-by: Shoaib <[email protected]> Co-authored-by: Panagiotis Foliadis <[email protected]> Co-authored-by: Matheus Farias <[email protected]> Co-authored-by: Mohamed Mokhtar <[email protected]> Co-authored-by: Hannan Aamir <[email protected]>
1 parent 7632208 commit f88e6d1

20 files changed

+221
-174
lines changed

.github/workflows/go-driver.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Go Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG14" ]
5+
branches: [ "master", "PG15" ]
66

77
pull_request:
8-
branches: [ "master", "PG14" ]
8+
branches: [ "master", "PG15" ]
99

1010
jobs:
1111
build:
@@ -26,14 +26,14 @@ jobs:
2626
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2727
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2828
echo "TAG=latest" >> $GITHUB_ENV
29-
elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
30-
echo "TAG=PG14_latest" >> $GITHUB_ENV
29+
elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
30+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3131
fi
3232
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3333
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3434
echo "TAG=latest" >> $GITHUB_ENV
35-
elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
36-
echo "TAG=PG14_latest" >> $GITHUB_ENV
35+
elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
36+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3737
fi
3838
fi
3939

.github/workflows/installcheck.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@ name: Build / Regression
22

33
on:
44
push:
5-
branches: [ 'master', 'PG14' ]
5+
branches: [ 'master', 'PG15' ]
66
pull_request:
7-
branches: [ 'master', 'PG14' ]
7+
branches: [ 'master', 'PG15' ]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

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

25-
- name: Install PostgreSQL 14
26-
if: steps.pg14cache.outputs.cache-hit != 'true'
25+
- name: Install PostgreSQL 15
26+
if: steps.pg15cache.outputs.cache-hit != 'true'
2727
run: |
28-
git clone --depth 1 --branch REL_14_STABLE git://git.postgresql.org/git/postgresql.git ~/pg14source
29-
cd ~/pg14source
30-
./configure --prefix=$HOME/pg14 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
28+
git clone --depth 1 --branch REL_15_STABLE git://git.postgresql.org/git/postgresql.git ~/pg15source
29+
cd ~/pg15source
30+
./configure --prefix=$HOME/pg15 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
3131
make install -j$(nproc) > /dev/null
3232
3333
- uses: actions/checkout@v3
3434

3535
- name: Build
3636
id: build
3737
run: |
38-
make PG_CONFIG=$HOME/pg14/bin/pg_config install -j$(nproc)
38+
make PG_CONFIG=$HOME/pg15/bin/pg_config install -j$(nproc)
3939
4040
- name: Regression tests
4141
id: regression_tests
4242
run: |
43-
make PG_CONFIG=$HOME/pg14/bin/pg_config installcheck
43+
make PG_CONFIG=$HOME/pg15/bin/pg_config installcheck
4444
continue-on-error: true
4545

4646
- name: Dump regression test errors

.github/workflows/jdbc-driver.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: JDBC Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG14" ]
5+
branches: [ "master", "PG15" ]
66

77
pull_request:
8-
branches: [ "master", "PG14" ]
8+
branches: [ "master", "PG15" ]
99

1010
jobs:
1111
build:
@@ -28,14 +28,14 @@ jobs:
2828
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2929
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
3030
echo "TAG=latest" >> $GITHUB_ENV
31-
elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
32-
echo "TAG=PG14_latest" >> $GITHUB_ENV
31+
elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
32+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3333
fi
3434
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3535
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3636
echo "TAG=latest" >> $GITHUB_ENV
37-
elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
38-
echo "TAG=PG14_latest" >> $GITHUB_ENV
37+
elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
38+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3939
fi
4040
fi
4141

.github/workflows/nodejs-driver.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Nodejs Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG14" ]
5+
branches: [ "master", "PG15" ]
66

77
pull_request:
8-
branches: [ "master", "PG14" ]
8+
branches: [ "master", "PG15" ]
99

1010
jobs:
1111
build:
@@ -23,14 +23,14 @@ jobs:
2323
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2424
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2525
echo "TAG=latest" >> $GITHUB_ENV
26-
elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
27-
echo "TAG=PG14_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
27+
echo "TAG=PG15_latest" >> $GITHUB_ENV
2828
fi
2929
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3030
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3131
echo "TAG=latest" >> $GITHUB_ENV
32-
elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
33-
echo "TAG=PG14_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
33+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3434
fi
3535
fi
3636

.github/workflows/python-driver.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Python Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG14" ]
5+
branches: [ "master", "PG15" ]
66

77
pull_request:
8-
branches: [ "master", "PG14" ]
8+
branches: [ "master", "PG15" ]
99

1010
jobs:
1111
build:
@@ -23,14 +23,14 @@ jobs:
2323
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2424
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2525
echo "TAG=latest" >> $GITHUB_ENV
26-
elif [[ "$GITHUB_REF" == "refs/heads/PG14" ]]; then
27-
echo "TAG=PG14_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG15" ]]; then
27+
echo "TAG=PG15_latest" >> $GITHUB_ENV
2828
fi
2929
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3030
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3131
echo "TAG=latest" >> $GITHUB_ENV
32-
elif [[ "$GITHUB_BASE_REF" == "PG14" ]]; then
33-
echo "TAG=PG14_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG15" ]]; then
33+
echo "TAG=PG15_latest" >> $GITHUB_ENV
3434
fi
3535
fi
3636

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</a>
3535
&nbsp;
3636
<a href="https://www.postgresql.org/docs/14/index.html">
37-
<img src="https://img.shields.io/badge/Version-PostgreSQL 14-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
37+
<img src="https://img.shields.io/badge/Version-Postgresql 15-00008B?labelColor=gray&style=flat&link=https://www.postgresql.org/docs/14/index.html"/>
3838
</a>
3939
&nbsp;
4040
<a href="https://github.com/apache/age/issues">

RELEASE

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
Release Notes for Apache AGE release 0.0.0 for PG 14
18+
Release Notes for Apache AGE release 0.0.0 for PG 15
1919

2020
Apache AGE 0.0.0 - Release Notes
2121

22-
NOTE: This is an initial release of PG14. There are no upgrade
22+
NOTE: This is an initial release of PG15. There are no upgrade
2323
scripts to this release.
2424

2525
**************************************************************

docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
# limitations under the License.
1717
#
1818

19-
FROM postgres:14
19+
FROM postgres:15
2020

2121
RUN apt-get update \
2222
&& apt-get install -y --no-install-recommends --no-install-suggests \
2323
bison \
2424
build-essential \
2525
flex \
26-
postgresql-server-dev-14 \
26+
postgresql-server-dev-15 \
2727
locales
2828

2929
ENV LANG=en_US.UTF-8

docker/Dockerfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
2424
bison \
2525
build-essential \
2626
flex \
27-
postgresql-server-dev-14 \
27+
postgresql-server-dev-15 \
2828
locales
2929

3030
ENV LANG=en_US.UTF-8

regress/expected/expr.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -2917,9 +2917,9 @@ $$) AS (toFloatList agtype);
29172917
SELECT * FROM cypher('expr', $$
29182918
RETURN toFloatList(['1.9432', 8.6222, '9.4111212', 344.22])
29192919
$$) AS (toFloatList agtype);
2920-
tofloatlist
2921-
-----------------------------------------
2922-
[1.9432, 8.6222, 9.4111212, 344.220001]
2920+
tofloatlist
2921+
-------------------------------------
2922+
[1.9432, 8.6222, 9.4111212, 344.22]
29232923
(1 row)
29242924

29252925
SELECT * FROM cypher('expr', $$

src/backend/catalog/ag_catalog.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ static bool is_age_drop(PlannedStmt *pstmt)
137137

138138
if (IsA(obj, String))
139139
{
140-
Value *val = (Value *)obj;
141-
char *str = val->val.str;
140+
String *val = (String *)obj;
141+
char *str = val->sval;
142142

143143
if (!pg_strcasecmp(str, "age"))
144144
return true;

src/backend/commands/graph_commands.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static Oid create_schema_for_graph(const Name graph_name)
148148
integer = SystemTypeName("int4");
149149
data_type = makeDefElem("as", (Node *)integer, -1);
150150
maxvalue = makeDefElem("maxvalue", (Node *)makeInteger(LABEL_ID_MAX), -1);
151-
cycle = makeDefElem("cycle", (Node *)makeInteger(true), -1);
151+
cycle = makeDefElem("cycle", (Node *)makeBoolean(true), -1);
152152
seq_stmt->options = list_make3(data_type, maxvalue, cycle);
153153
seq_stmt->ownerId = InvalidOid;
154154
seq_stmt->for_identity = false;
@@ -198,7 +198,7 @@ Datum drop_graph(PG_FUNCTION_ARGS)
198198
static void drop_schema_for_graph(char *graph_name_str, const bool cascade)
199199
{
200200
DropStmt *drop_stmt;
201-
Value *schema_name;
201+
String *schema_name;
202202
List *label_id_seq_name;
203203
DropBehavior behavior;
204204

src/backend/commands/label_commands.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -516,12 +516,12 @@ static FuncCall *build_id_default_func_expr(char *graph_name, char *label_name,
516516
label_id_func_name = list_make2(makeString("ag_catalog"),
517517
makeString("_label_id"));
518518
graph_name_const = makeNode(A_Const);
519-
graph_name_const->val.type = T_String;
520-
graph_name_const->val.val.str = graph_name;
519+
graph_name_const->val.sval.type = T_String;
520+
graph_name_const->val.sval.sval = graph_name;
521521
graph_name_const->location = -1;
522522
label_name_const = makeNode(A_Const);
523-
label_name_const->val.type = T_String;
524-
label_name_const->val.val.str = label_name;
523+
label_name_const->val.sval.type = T_String;
524+
label_name_const->val.sval.sval = label_name;
525525
label_name_const->location = -1;
526526
label_id_func_args = list_make2(graph_name_const, label_name_const);
527527
label_id_func = makeFuncCall(label_id_func_name, label_id_func_args, COERCE_SQL_SYNTAX, -1);
@@ -530,8 +530,8 @@ static FuncCall *build_id_default_func_expr(char *graph_name, char *label_name,
530530
nextval_func_name = SystemFuncName("nextval");
531531
qualified_seq_name = quote_qualified_identifier(schema_name, seq_name);
532532
qualified_seq_name_const = makeNode(A_Const);
533-
qualified_seq_name_const->val.type = T_String;
534-
qualified_seq_name_const->val.val.str = qualified_seq_name;
533+
qualified_seq_name_const->val.sval.type = T_String;
534+
qualified_seq_name_const->val.sval.sval = qualified_seq_name;
535535
qualified_seq_name_const->location = -1;
536536
regclass_cast = makeNode(TypeCast);
537537
regclass_cast->typeName = SystemTypeName("regclass");

src/backend/executor/cypher_delete.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ static void process_delete_list(CustomScanState *node)
377377
ResultRelInfo *resultRelInfo;
378378
HeapTuple heap_tuple;
379379
char *label_name;
380-
Value *pos;
380+
Integer *pos;
381381
int entity_position;
382382

383383
item = lfirst(lc);
384384

385385
pos = item->entity_position;
386-
entity_position = pos->val.ival;
386+
entity_position = pos->ival;
387387

388388
/* skip if the entity is null */
389389
if (scanTupleSlot->tts_isnull[entity_position - 1])

src/backend/parser/cypher_analyze.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static Query *analyze_cypher_and_coerce(List *stmt, RangeTblFunction *rtfunc,
798798

799799

800800
addNSItemToQuery(pstate, pnsi, true, true, true);
801-
query->targetList = expandNSItemAttrs(pstate, pnsi, 0, -1);
801+
query->targetList = expandNSItemAttrs(pstate, pnsi, 0, true, -1);
802802

803803
markTargetListOrigins(pstate, query->targetList);
804804

0 commit comments

Comments
 (0)