zhoushengmufc / iosselect

webapp通用选择器
MIT License
1.17k stars 345 forks source link

Can I get all the data structure (inculde comments on each column ) by a sql #56

Closed sunszl closed 5 years ago

sunszl commented 5 years ago

I'm new user of PG. When I use Sqlserver, I can get a datatable structure map (includining columns and tables' comments) by doing a sql search from syscolumns ,systypes , sysobjects ,syscomments , sys.extended_properties.

Can postgres do the similar thing so that I can quick provide a datatable structue map for other developer?

Any help is appreciated.

the sql for sqlserver is : ########################### SELECT * FROM syscolumns A Left Join systypes B On A.xusertype=B.xusertype Inner Join sysobjects D On A.id=D.id and D.xtype='U' and D.name<>'dtproperties' Left Join syscomments E on A.cdefault=E.id Left Join sys.extended_properties G on A.id=G.major_id and A.colid=G.minor_id Left Join

sys.extended_properties F On D.id=F.major_id and F.minor_id=0 Order By A.id,A.colorder ############################