Skip to content

Commit cf076cc

Browse files
committed
First steps to update pgdd for pgx 0.7.0
1 parent 6873d4d commit cf076cc

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ pg_test = []
2020

2121
#pgx = { git = "https://github.com/zombodb/pgx", branch = "develop" }
2222
#pgx-macros = { git = "https://github.com/zombodb/pgx", branch = "develop" }
23-
pgx = "=0.6.0"
24-
pgx-macros = "=0.6.0"
23+
pgx = "=0.7.0-beta.0"
24+
pgx-macros = "=0.7.0-beta.0"
2525

2626
#pgx-utils = { git = "https://github.com/zombodb/pgx", branch = "develop" }
27-
pgx-utils = "=0.6.0"
27+
#pgx-utils = "=0.6.1"
2828

2929
[dev-dependencies]
3030
#pgx-tests = { git = "https://github.com/zombodb/pgx", branch = "develop" }
31-
pgx-tests = "=0.6.0"
31+
pgx-tests = "=0.7.0-beta.0"
3232

3333

3434
[profile.dev]

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ extension_sql_file!("sql/load_default_data.sql",
2222

2323
#[pg_extern]
2424
fn schemas(
25-
) -> TableIterator<'static, (name!(s_name, Option<String>),
25+
) -> Result<TableIterator<'static, (
26+
name!(s_name, Option<String>),
2627
name!(owner, Option<String>),
2728
name!(data_source, Option<String>),
2829
name!(sensitive, Option<bool>),
@@ -34,13 +35,14 @@ fn schemas(
3435
name!(size_pretty, Option<String>),
3536
name!(size_plus_indexes, Option<String>),
3637
name!(size_bytes, Option<i64>),
37-
name!(size_plus_indexes_bytes, Option<i64>))> {
38+
name!(size_plus_indexes_bytes, Option<i64>)
39+
),>, spi::Error,> {
3840
let query = include_str!("sql/function_query/schemas-all.sql");
3941
let mut results = Vec::new();
4042

4143
Spi::connect(|client| {
4244
client
43-
.select(query, None, None)
45+
.select(query, None, None)?
4446
.map(|row| (row["s_name"].value(),
4547
row["owner"].value(),
4648
row["data_source"].value(),

0 commit comments

Comments
 (0)