Skip to content

Commit 5d2eadf

Browse files
1 parent ff4b0e8 commit 5d2eadf

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

R/dbListObjects_PqConnection_ANY.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ dbListObjects_PqConnection_ANY <- function(conn, prefix = NULL, ...) {
1414
}
1515
query <- paste0(
1616
"SELECT ", null_varchar, " AS schema, table_name AS table FROM ( \n",
17-
list_tables(conn = conn, order_by = "table_type, table_name"),
17+
list_tables(conn = conn, order_by = "table_type, table_name"),
1818
") as table_query \n",
1919
"UNION ALL\n",
2020
"SELECT DISTINCT table_schema AS schema, ", null_varchar, " AS table FROM ( \n",
21-
list_tables(conn = conn, where_schema = "true"),
21+
list_tables(conn = conn, where_schema = "true"),
2222
") as schema_query;"
2323
)
2424
} else {
@@ -38,11 +38,11 @@ dbListObjects_PqConnection_ANY <- function(conn, prefix = NULL, ...) {
3838
)
3939
query <- paste0(
4040
"SELECT table_schema AS schema, table_name AS table FROM ( \n",
41-
list_tables(
42-
conn = conn,
43-
where_schema = where_schema,
44-
order_by = "table_type, table_name"
45-
),
41+
list_tables(
42+
conn = conn,
43+
where_schema = where_schema,
44+
order_by = "table_type, table_name"
45+
),
4646
") as table_query"
4747
)
4848
}

R/tables.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ list_fields <- function(conn, id) {
185185
# as there cannot be multiple tables with the same name in a single schema
186186
only_first <- FALSE
187187

188-
# or we have to look the table up in the schemas on the search path
188+
# or we have to look the table up in the schemas on the search path
189189
} else if (is_redshift) {
190190
# A variant of the Postgres version that uses CTEs and generate_series()
191191
# instead of generate_subscripts(), the latter is not supported on Redshift
@@ -211,10 +211,10 @@ list_fields <- function(conn, id) {
211211
# How to unnest `current_schemas(true)` array with element number (works since v9.4):
212212
# https://stackoverflow.com/a/8767450/2114932
213213
query <- paste0(
214-
"(",
215-
"SELECT * FROM unnest(current_schemas(true)) WITH ORDINALITY AS tbl(table_schema, nr) \n",
216-
"WHERE table_schema != 'pg_catalog'",
217-
") schemas_on_path"
214+
"(",
215+
"SELECT * FROM unnest(current_schemas(true)) WITH ORDINALITY AS tbl(table_schema, nr) \n",
216+
"WHERE table_schema != 'pg_catalog'",
217+
") schemas_on_path"
218218
)
219219
only_first <- TRUE
220220
}

0 commit comments

Comments
 (0)