Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6916c17

Browse files
committed
Merge tag 'tokio-postgres-v0.7.12' into pgbouncer-mode
tokio-postgres v0.7.12
2 parents 54a490b + 8d08adb commit 6916c17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3379
-944
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,60 +17,87 @@ jobs:
1717
name: rustfmt
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- uses: sfackler/actions/rustup@master
2222
- uses: sfackler/actions/rustfmt@master
23-
23+
2424
clippy:
2525
name: clippy
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2929
- uses: sfackler/actions/rustup@master
30-
- run: echo "::set-output name=version::$(rustc --version)"
30+
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
3131
id: rust-version
32-
- uses: actions/cache@v1
32+
- uses: actions/cache@v3
3333
with:
3434
path: ~/.cargo/registry/index
3535
key: index-${{ runner.os }}-${{ github.run_number }}
3636
restore-keys: |
3737
index-${{ runner.os }}-
3838
- run: cargo generate-lockfile
39-
- uses: actions/cache@v1
39+
- uses: actions/cache@v3
4040
with:
4141
path: ~/.cargo/registry/cache
4242
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
4343
- run: cargo fetch
44-
- uses: actions/cache@v1
44+
- uses: actions/cache@v3
4545
with:
4646
path: target
4747
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y
4848
- run: cargo clippy --all --all-targets
4949

50+
check-wasm32:
51+
name: check-wasm32
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v3
55+
- uses: sfackler/actions/rustup@master
56+
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
57+
id: rust-version
58+
- run: rustup target add wasm32-unknown-unknown
59+
- uses: actions/cache@v3
60+
with:
61+
path: ~/.cargo/registry/index
62+
key: index-${{ runner.os }}-${{ github.run_number }}
63+
restore-keys: |
64+
index-${{ runner.os }}-
65+
- run: cargo generate-lockfile
66+
- uses: actions/cache@v3
67+
with:
68+
path: ~/.cargo/registry/cache
69+
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
70+
- run: cargo fetch
71+
- uses: actions/cache@v3
72+
with:
73+
path: target
74+
key: check-wasm32-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
75+
- run: cargo check --target wasm32-unknown-unknown --manifest-path tokio-postgres/Cargo.toml --no-default-features --features js
76+
5077
test:
5178
name: test
5279
runs-on: ubuntu-latest
5380
steps:
54-
- uses: actions/checkout@v2
81+
- uses: actions/checkout@v3
5582
- run: docker compose up -d
5683
- uses: sfackler/actions/rustup@master
5784
with:
58-
version: 1.62.0
59-
- run: echo "::set-output name=version::$(rustc --version)"
85+
version: 1.74.0
86+
- run: echo "version=$(rustc --version)" >> $GITHUB_OUTPUT
6087
id: rust-version
61-
- uses: actions/cache@v1
88+
- uses: actions/cache@v3
6289
with:
6390
path: ~/.cargo/registry/index
6491
key: index-${{ runner.os }}-${{ github.run_number }}
6592
restore-keys: |
6693
index-${{ runner.os }}-
6794
- run: cargo generate-lockfile
68-
- uses: actions/cache@v1
95+
- uses: actions/cache@v3
6996
with:
7097
path: ~/.cargo/registry/cache
7198
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
7299
- run: cargo fetch
73-
- uses: actions/cache@v1
100+
- uses: actions/cache@v3
74101
with:
75102
path: target
76103
key: test-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}y

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ members = [
1010
"postgres-types",
1111
"tokio-postgres",
1212
]
13+
resolver = "2"
1314

1415
[profile.release]
1516
debug = 2

codegen/src/errcodes.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# errcodes.txt
33
# PostgreSQL error codes
44
#
5-
# Copyright (c) 2003-2020, PostgreSQL Global Development Group
5+
# Copyright (c) 2003-2022, PostgreSQL Global Development Group
66
#
77
# This list serves as the basis for generating source files containing error
88
# codes. It is kept in a common format to make sure all these source files have
@@ -222,6 +222,7 @@ Section: Class 22 - Data Exception
222222
2203D E ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS too_many_json_array_elements
223223
2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
224224
2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required
225+
2203G E ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE sql_json_item_cannot_be_cast_to_target_type
225226

226227
Section: Class 23 - Integrity Constraint Violation
227228

@@ -428,6 +429,7 @@ Section: Class 57 - Operator Intervention
428429
57P02 E ERRCODE_CRASH_SHUTDOWN crash_shutdown
429430
57P03 E ERRCODE_CANNOT_CONNECT_NOW cannot_connect_now
430431
57P04 E ERRCODE_DATABASE_DROPPED database_dropped
432+
57P05 E ERRCODE_IDLE_SESSION_TIMEOUT idle_session_timeout
431433

432434
Section: Class 58 - System Error (errors external to PostgreSQL itself)
433435

codegen/src/pg_range.dat

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pg_range.dat
44
# Initial contents of the pg_range system catalog.
55
#
6-
# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
6+
# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
77
# Portions Copyright (c) 1994, Regents of the University of California
88
#
99
# src/include/catalog/pg_range.dat
@@ -12,20 +12,23 @@
1212

1313
[
1414

15-
{ rngtypid => 'int4range', rngsubtype => 'int4', rngsubopc => 'btree/int4_ops',
15+
{ rngtypid => 'int4range', rngsubtype => 'int4',
16+
rngmultitypid => 'int4multirange', rngsubopc => 'btree/int4_ops',
1617
rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' },
1718
{ rngtypid => 'numrange', rngsubtype => 'numeric',
18-
rngsubopc => 'btree/numeric_ops', rngcanonical => '-',
19-
rngsubdiff => 'numrange_subdiff' },
19+
rngmultitypid => 'nummultirange', rngsubopc => 'btree/numeric_ops',
20+
rngcanonical => '-', rngsubdiff => 'numrange_subdiff' },
2021
{ rngtypid => 'tsrange', rngsubtype => 'timestamp',
21-
rngsubopc => 'btree/timestamp_ops', rngcanonical => '-',
22-
rngsubdiff => 'tsrange_subdiff' },
22+
rngmultitypid => 'tsmultirange', rngsubopc => 'btree/timestamp_ops',
23+
rngcanonical => '-', rngsubdiff => 'tsrange_subdiff' },
2324
{ rngtypid => 'tstzrange', rngsubtype => 'timestamptz',
24-
rngsubopc => 'btree/timestamptz_ops', rngcanonical => '-',
25-
rngsubdiff => 'tstzrange_subdiff' },
26-
{ rngtypid => 'daterange', rngsubtype => 'date', rngsubopc => 'btree/date_ops',
25+
rngmultitypid => 'tstzmultirange', rngsubopc => 'btree/timestamptz_ops',
26+
rngcanonical => '-', rngsubdiff => 'tstzrange_subdiff' },
27+
{ rngtypid => 'daterange', rngsubtype => 'date',
28+
rngmultitypid => 'datemultirange', rngsubopc => 'btree/date_ops',
2729
rngcanonical => 'daterange_canonical', rngsubdiff => 'daterange_subdiff' },
28-
{ rngtypid => 'int8range', rngsubtype => 'int8', rngsubopc => 'btree/int8_ops',
30+
{ rngtypid => 'int8range', rngsubtype => 'int8',
31+
rngmultitypid => 'int8multirange', rngsubopc => 'btree/int8_ops',
2932
rngcanonical => 'int8range_canonical', rngsubdiff => 'int8range_subdiff' },
3033

3134
]

0 commit comments

Comments
 (0)