Skip to content

Commit

Permalink
Merge branch 'postgresql-dialect' into use-jsonb-for-pg-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Nov 9, 2024
2 parents ea72e5a + 2fb7e74 commit 19b4eb5
Show file tree
Hide file tree
Showing 162 changed files with 4,679 additions and 1,051 deletions.
152 changes: 78 additions & 74 deletions .ci/e2e-expected/backslash-dt.txt

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions .ci/evaluate-with-psql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,43 +86,43 @@ diff -i -w -s .ci/e2e-result/backslash-l.txt .ci/e2e-expected/backslash-l.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option dml batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/dml-batch.txt)" > .ci/e2e-result/dml-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/dml-batch.txt)" > .ci/e2e-result/dml-batching.txt
diff -i -w -s .ci/e2e-result/dml-batching.txt .ci/e2e-expected/dml-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option ddl batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/ddl-batch.txt)"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/ddl-batch.txt)"
echo "\d" | /usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" > .ci/e2e-result/ddl-batching.txt
diff -i -w -s .ci/e2e-result/ddl-batching.txt .ci/e2e-expected/ddl-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option ddl-dml mix batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/ddl-dml-batch.txt)" &> .ci/e2e-result/ddl-dml-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/ddl-dml-batch.txt)" &> .ci/e2e-result/ddl-dml-batching.txt
diff -i -w -s .ci/e2e-result/ddl-dml-batching.txt .ci/e2e-expected/ddl-dml-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option SELECT DML batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/select-dml-batch.txt)" &> .ci/e2e-result/select-dml-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/select-dml-batch.txt)" &> .ci/e2e-result/select-dml-batching.txt
diff -i -w -s .ci/e2e-result/select-dml-batching.txt .ci/e2e-expected/select-dml-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option SELECT DDL batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/select-ddl-batch.txt)" &> .ci/e2e-result/select-ddl-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/select-ddl-batch.txt)" &> .ci/e2e-result/select-ddl-batching.txt
diff -i -w -s .ci/e2e-result/select-ddl-batching.txt .ci/e2e-expected/select-ddl-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option WITH DML batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/with-dml-batch.txt)" &> .ci/e2e-result/with-dml-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/with-dml-batch.txt)" &> .ci/e2e-result/with-dml-batching.txt
diff -i -w -s .ci/e2e-result/with-dml-batching.txt .ci/e2e-expected/with-dml-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"-c option begin/commit batching\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "$(cat .ci/e2e-batching/begin-commit-batch.txt)" &> .ci/e2e-result/begin-commit-batching.txt
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "$(cat .ci/e2e-batching/begin-commit-batch.txt)" &> .ci/e2e-result/begin-commit-batching.txt
diff -i -w -s .ci/e2e-result/begin-commit-batching.txt .ci/e2e-expected/begin-commit-batching.txt
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"COPY FROM STDIN\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "COPY users FROM STDIN;" <<EOF
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "COPY users FROM STDIN;" <<EOF
12 12 12
13 13 13
14 14 14
Expand All @@ -136,7 +136,7 @@ diff -i -w -s .ci/e2e-result/copy-from-stdin.txt .ci/e2e-expected/copy-from-stdi
RETURN_CODE=$((${RETURN_CODE}||$?))

echo "------Test \"COPY FROM STDIN in batch\"------"
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" -c "select 0; COPY users FROM STDIN; COPY users FROM STDIN; select 1;" <<EOF
/usr/lib/postgresql/"${PSQL_VERSION}"/bin/psql -h localhost -p 4242 -d "${GOOGLE_CLOUD_DATABASE_WITH_VERSION}" --set=SHOW_ALL_RESULTS=off -c "select 0; COPY users FROM STDIN; COPY users FROM STDIN; select 1;" <<EOF
18 18 18
\.
19 19 19
Expand Down
90 changes: 74 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
distribution: 'zulu'
- run: java -version
- run: .ci/run-with-credentials.sh lint
e2e-psql-v11-v14:
e2e-psql-v12-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
Expand All @@ -43,12 +43,12 @@ jobs:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-11"
- name: "Install postgresql-client-12"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-11
sudo apt-get install postgresql-client-12
- id: 'auth'
uses: google-github-actions/auth@v2
with:
Expand All @@ -60,8 +60,8 @@ jobs:
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 11 14.1
e2e-psql-v12-v1-v14:
- run: .ci/run-with-credentials.sh e2e-psql 12 14.1
e2e-psql-v13-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
Expand All @@ -72,12 +72,12 @@ jobs:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-12"
- name: "Install postgresql-client-13"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-12
sudo apt-get install postgresql-client-13
- id: 'auth'
uses: google-github-actions/auth@v2
with:
Expand All @@ -89,8 +89,8 @@ jobs:
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 12 14.1
e2e-psql-v13-v14:
- run: .ci/run-with-credentials.sh e2e-psql 13 14.1
e2e-psql-v14-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
Expand All @@ -101,12 +101,12 @@ jobs:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-13"
- name: "Install postgresql-client-14"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-13
sudo apt-get install postgresql-client-14
- id: 'auth'
uses: google-github-actions/auth@v2
with:
Expand All @@ -118,8 +118,8 @@ jobs:
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 13 14.1
e2e-psql-v14-v14:
- run: .ci/run-with-credentials.sh e2e-psql 14 14.1
e2e-psql-v15-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
Expand All @@ -130,12 +130,12 @@ jobs:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-14"
- name: "Install postgresql-client-15"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-14
sudo apt-get install postgresql-client-15
- id: 'auth'
uses: google-github-actions/auth@v2
with:
Expand All @@ -147,4 +147,62 @@ jobs:
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 14 14.1
- run: .ci/run-with-credentials.sh e2e-psql 15 14.1
e2e-psql-v16-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-16"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-16
- id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.JSON_SERVICE_ACCOUNT_CREDENTIALS }}'
- id: 'setup-gcloud'
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT }}
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 16 14.1
e2e-psql-v17-v14:
needs: [check-env]
if: needs.check-env.outputs.has-key == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- run: java -version
- name: "Install postgresql-client-17"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-17
- id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.JSON_SERVICE_ACCOUNT_CREDENTIALS }}'
- id: 'setup-gcloud'
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT }}
- name: "Install gcloud alpha component"
run: gcloud components install alpha
- run: .ci/run-with-credentials.sh uber-jar-build
- run: .ci/run-with-credentials.sh e2e-psql 17 14.1
115 changes: 0 additions & 115 deletions .github/workflows/integration-multiplexed-sessions.yaml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ jobs:
- name: Run JDBC Sample tests
working-directory: ./samples/java/jdbc
run: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Run R2DBC Sample tests
working-directory: ./samples/java/r2dbc
run: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Run Hibernate Sample tests
working-directory: ./samples/java/hibernate
run: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Run Spring Data JPA Sample tests
working-directory: ./samples/java/spring-data-jpa
run: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
go-samples:
runs-on: ubuntu-latest
steps:
Expand All @@ -35,6 +41,9 @@ jobs:
- name: Run pgx Sample tests
working-directory: ./samples/golang/pgx
run: go test
- name: Run migrate Sample tests
working-directory: ./samples/golang/migrate
run: go test
python-samples:
runs-on: ubuntu-latest
steps:
Expand All @@ -60,6 +69,11 @@ jobs:
run: |
pip install -r requirements.txt
python sample.py
- name: Run connectorx sample tests
working-directory: ./samples/python/connectorx
run: |
pip install -r requirements.txt
python connectorx_sample.py
nodejs-samples:
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit 19b4eb5

Please sign in to comment.