Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/postgresql/postgresql.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,17 @@ export default {
* JSON-serializable object.
*/
async getSchema() {
const filter = this.$auth.pd_schema_explorer_retrieve_all ?
"NOT IN ('pg_catalog', 'information_schema')" :
"= 'public'";
const text = `
SELECT table_name AS "tableName",
column_name AS "columnName",
is_nullable AS "isNullable",
data_type AS "dataType",
column_default AS "columnDefault"
FROM information_schema.columns
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
WHERE table_schema ${filter}
ORDER BY table_name,
ordinal_position
`;
Expand Down
Loading