mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 23:06:00 +00:00
added plugins
This commit is contained in:
19
plugins/dbgate-plugin-postgres/src/backend/sql/columns.js
Normal file
19
plugins/dbgate-plugin-postgres/src/backend/sql/columns.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = `
|
||||
select
|
||||
table_schema as "schemaName",
|
||||
table_name as "pureName",
|
||||
column_name as "columnName",
|
||||
is_nullable as "isNullable",
|
||||
data_type as "dataType",
|
||||
character_maximum_length as "charMaxLength",
|
||||
numeric_precision as "numericPrecision",
|
||||
numeric_scale as "numericScale",
|
||||
column_default as "defaultValue"
|
||||
from information_schema.columns
|
||||
where
|
||||
table_schema <> 'information_schema'
|
||||
and table_schema <> 'pg_catalog'
|
||||
and table_schema !~ '^pg_toast'
|
||||
and 'tables:' || table_schema || '.' || table_name =OBJECT_ID_CONDITION
|
||||
order by ordinal_position
|
||||
`;
|
||||
Reference in New Issue
Block a user