Skip to content

Commit 52e48bb

Browse files
committed
fix: quote PostgreSQL identifiers for PascalCase compatibility
1 parent 6993f64 commit 52e48bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ mod postgres {
19341934

19351935
let table_size: i64 = self
19361936
.client
1937-
.query_one(&format!("SELECT pg_total_relation_size('{name}')"), &[])
1937+
.query_one(&format!(r#"SELECT pg_total_relation_size('"{name}"')"#), &[])
19381938
.await?
19391939
.get(0);
19401940
let table_size = helpers::format_size(table_size as f64);
@@ -2008,7 +2008,7 @@ mod postgres {
20082008
let sql = format!(
20092009
r#"
20102010
SELECT * FROM "{name}"
2011-
ORDER BY {first_column}
2011+
ORDER BY "{first_column}"
20122012
LIMIT {ROWS_PER_PAGE}
20132013
OFFSET {offset}
20142014
"#

0 commit comments

Comments
 (0)