我想从postgis获取所有点几何类型表 . 我可以使用sql select进行此操作 .
我可以从 select * from information_schema.tables 表中选择所有表格 .
select * from information_schema.tables
我可以得到像这样的所有几何列:
SELECT type FROM geometry_columns;
此查询返回“GEOMETRY”
但我想选择所有具有POINT几何类型的表 .
如果我的问题正确,你可以从 information_schema 查询:
information_schema
select distinct table_schema, table_name from information_schema.columns where data_type = 'point';
例如:
t=# create table p(i point); CREATE TABLE t=# select distinct table_schema,table_name from information_schema.columns where data_type = 'point'; table_schema | table_name --------------+------------ postgres | p (1 row)
1 回答
如果我的问题正确,你可以从
information_schema
查询:例如: