pg提取序列号

select table_catalog , table_schema , table_name , column_name , column_default  , regexp_matches(column_default , '^nextval[\(]([^\)]+)::regclass[\)]$') 

from information_schema.columns where column_default like 'nextval%' 

 mark

猜你喜欢

转载自jjxliu306.iteye.com/blog/2383040