mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 23:06:00 +00:00
22 lines
647 B
JavaScript
22 lines
647 B
JavaScript
module.exports = `
|
|
select
|
|
table_schema as "schema_name",
|
|
table_name as "pure_name",
|
|
column_name as "column_name",
|
|
is_nullable as "is_nullable",
|
|
data_type as "data_type",
|
|
character_maximum_length as "char_max_length",
|
|
numeric_precision as "numeric_precision",
|
|
numeric_scale as "numeric_scale",
|
|
column_default as "default_value"
|
|
from information_schema.columns
|
|
where
|
|
table_schema !~ '^_timescaledb_'
|
|
and (
|
|
('tables:' || table_schema || '.' || table_name) =OBJECT_ID_CONDITION
|
|
or
|
|
('views:' || table_schema || '.' || table_name) =OBJECT_ID_CONDITION
|
|
)
|
|
and table_schema =SCHEMA_NAME_CONDITION
|
|
order by ordinal_position
|
|
`; |