Skip to content

Commit fc7db23

Browse files
committed
Merge branch 'PG16' into master_to_PostgreSQL_version_16
Conflicts: docker/Dockerfile.dev Changes to be committed: 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: .gitignore modified: docker/Dockerfile modified: docker/Dockerfile.dev modified: src/backend/catalog/ag_catalog.c modified: src/backend/catalog/ag_graph.c modified: src/backend/catalog/ag_label.c modified: src/backend/commands/label_commands.c modified: src/backend/executor/cypher_create.c modified: src/backend/executor/cypher_merge.c modified: src/backend/executor/cypher_set.c modified: src/backend/executor/cypher_utils.c modified: src/backend/nodes/cypher_readfuncs.c modified: src/backend/parser/cypher_analyze.c modified: src/backend/parser/cypher_clause.c modified: src/backend/parser/cypher_expr.c modified: src/backend/parser/cypher_item.c modified: src/backend/parser/cypher_parse_agg.c modified: src/backend/utils/adt/agtype.c modified: src/backend/utils/adt/agtype_gin.c modified: src/backend/utils/adt/agtype_ops.c modified: src/backend/utils/adt/agtype_parser.c modified: src/backend/utils/ag_func.c modified: src/backend/utils/cache/ag_cache.c modified: src/backend/utils/graph_generation.c
2 parents 0ea1186 + 8e56db9 commit fc7db23

29 files changed

+270
-168
lines changed

.github/workflows/go-driver.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Go Driver Tests
22

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

77
pull_request:
8-
branches: [ "master", "PG15" ]
8+
branches: [ "master", "PG16" ]
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/PG15" ]]; then
30-
echo "TAG=PG15_latest" >> $GITHUB_ENV
29+
elif [[ "$GITHUB_REF" == "refs/heads/PG16" ]]; then
30+
echo "TAG=PG16_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" == "PG15" ]]; then
36-
echo "TAG=PG15_latest" >> $GITHUB_ENV
35+
elif [[ "$GITHUB_BASE_REF" == "PG16" ]]; then
36+
echo "TAG=PG16_latest" >> $GITHUB_ENV
3737
fi
3838
fi
3939

.github/workflows/installcheck.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@ name: Build / Regression
22

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

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

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

25-
- name: Install PostgreSQL 15
26-
if: steps.pg15cache.outputs.cache-hit != 'true'
25+
- name: Install PostgreSQL 16
26+
if: steps.pg16cache.outputs.cache-hit != 'true'
2727
run: |
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
28+
git clone --depth 1 --branch REL_16_STABLE git://git.postgresql.org/git/postgresql.git ~/pg16source
29+
cd ~/pg16source
30+
./configure --prefix=$HOME/pg16 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/pg15/bin/pg_config install -j$(nproc)
38+
make PG_CONFIG=$HOME/pg16/bin/pg_config install -j$(nproc)
3939
4040
- name: Regression tests
4141
id: regression_tests
4242
run: |
43-
make PG_CONFIG=$HOME/pg15/bin/pg_config installcheck
43+
make PG_CONFIG=$HOME/pg16/bin/pg_config installcheck
4444
continue-on-error: true
4545

4646
- name: Dump regression test errors

.github/workflows/jdbc-driver.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: JDBC Driver Tests
22

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

77
pull_request:
8-
branches: [ "master", "PG15" ]
8+
branches: [ "master", "PG16" ]
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/PG15" ]]; then
32-
echo "TAG=PG15_latest" >> $GITHUB_ENV
31+
elif [[ "$GITHUB_REF" == "refs/heads/PG16" ]]; then
32+
echo "TAG=PG16_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" == "PG15" ]]; then
38-
echo "TAG=PG15_latest" >> $GITHUB_ENV
37+
elif [[ "$GITHUB_BASE_REF" == "PG16" ]]; then
38+
echo "TAG=PG16_latest" >> $GITHUB_ENV
3939
fi
4040
fi
4141

.github/workflows/nodejs-driver.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Nodejs Driver Tests
22

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

77
pull_request:
8-
branches: [ "master", "PG15" ]
8+
branches: [ "master", "PG16" ]
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/PG15" ]]; then
27-
echo "TAG=PG15_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG16" ]]; then
27+
echo "TAG=PG16_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" == "PG15" ]]; then
33-
echo "TAG=PG15_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG16" ]]; then
33+
echo "TAG=PG16_latest" >> $GITHUB_ENV
3434
fi
3535
fi
3636

.github/workflows/python-driver.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Python Driver Tests
22

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

77
pull_request:
8-
branches: [ "master", "PG15" ]
8+
branches: [ "master", "PG16" ]
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/PG15" ]]; then
27-
echo "TAG=PG15_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG16" ]]; then
27+
echo "TAG=PG16_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" == "PG15" ]]; then
33-
echo "TAG=PG15_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG16" ]]; then
33+
echo "TAG=PG16_latest" >> $GITHUB_ENV
3434
fi
3535
fi
3636

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ age--*.*.*.sql
77
.DS_Store
88
*.tokens
99
*.interp
10+
*.dylib

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
# limitations under the License.
1717
#
1818

19-
FROM postgres:15
19+
FROM postgres:16
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-15 \
26+
postgresql-server-dev-16 \
2727
locales
2828

2929
ENV LANG=en_US.UTF-8

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:15
20+
FROM postgres:16
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-15 \
27+
postgresql-server-dev-16 \
2828
locales
2929

3030
ENV LANG=en_US.UTF-8

src/backend/catalog/ag_catalog.c

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,29 @@ void process_utility_hook_fini(void)
8686
* from being thrown, we need to disable the object_access_hook before dropping
8787
* the extension.
8888
*/
89-
void ag_ProcessUtility_hook(PlannedStmt *pstmt, const char *queryString, bool readOnlyTree,
90-
ProcessUtilityContext context, ParamListInfo params,
91-
QueryEnvironment *queryEnv, DestReceiver *dest,
92-
QueryCompletion *qc)
89+
void ag_ProcessUtility_hook(PlannedStmt *pstmt, const char *queryString,
90+
bool readOnlyTree, ProcessUtilityContext context,
91+
ParamListInfo params, QueryEnvironment *queryEnv,
92+
DestReceiver *dest, QueryCompletion *qc)
9393
{
9494
if (is_age_drop(pstmt))
95+
{
9596
drop_age_extension((DropStmt *)pstmt->utilityStmt);
97+
}
9698
else if (prev_process_utility_hook)
97-
(*prev_process_utility_hook) (pstmt, queryString, readOnlyTree, context, params,
98-
queryEnv, dest, qc);
99+
{
100+
(*prev_process_utility_hook) (pstmt, queryString, readOnlyTree, context,
101+
params, queryEnv, dest, qc);
102+
}
99103
else
100-
standard_ProcessUtility(pstmt, queryString, readOnlyTree, context, params, queryEnv,
101-
dest, qc);
104+
{
105+
Assert(IsA(pstmt, PlannedStmt));
106+
Assert(pstmt->commandType == CMD_UTILITY);
107+
Assert(queryString != NULL); /* required as of 8.4 */
108+
Assert(qc == NULL || qc->commandTag == CMDTAG_UNKNOWN);
109+
standard_ProcessUtility(pstmt, queryString, readOnlyTree, context,
110+
params, queryEnv, dest, qc);
111+
}
102112
}
103113

104114
static void drop_age_extension(DropStmt *stmt)

src/backend/catalog/ag_graph.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ void insert_graph(const Name graph_name, const Oid nsp_id)
4949
HeapTuple tuple;
5050

5151

52-
AssertArg(graph_name);
53-
AssertArg(OidIsValid(nsp_id));
52+
Assert(graph_name);
53+
Assert(OidIsValid(nsp_id));
5454

5555
ag_graph = table_open(ag_graph_relation_id(), RowExclusiveLock);
5656
values[Anum_ag_graph_oid - 1] = ObjectIdGetDatum(nsp_id);

0 commit comments

Comments
 (0)