【问题标题】:Export Progress OpenEdge column description as table comment in PostgreSQL将 Progress OpenEdge 列描述导出为 PostgreSQL 中的表注释
【发布时间】:2018-04-13 18:34:35
【问题描述】:

我已设法将数据库结构从 Progress Open Edge 导出到 PostgreSQL,但没有任何列 cmets。由于许多迁移工具的功能有限,我正在考虑自己编写 SQL 代码。所以现在我正在考虑遍历我的数据库“数据”中的所有表和列并生成如下所示的 SQL 代码

COMMENT ON COLUMN public.table_name.table_column IS 'Value from PROGRESS';

由于我不熟悉任何正在进行的系统表,我正在寻求指导,以循环遍历我的数据库“数据”中的所有表和列并从下图中获取值

【问题讨论】:

    标签: postgresql openedge progress-4gl


    【解决方案1】:

    您可能正在寻找“虚拟系统表”。

    _Field(用于字段)和_File(用于表格)。

    非常简短的例子:

    SELECT * FROM PUB."_File" where "_Tbl-Type" = 'T'
    

    摘自这篇知识库文章:

    https://knowledgebase.progress.com/articles/Article/P43044

    在有关不同虚拟系统表的文档中还有很多更多信息。从这里开始:

    https://www.progress.com/documentation/openedge

    【讨论】:

      【解决方案2】:

      以下查询对我有用:

      select col as column_name, 
             description as comment
      from sysprogress.syscolumns_full
      where tbl = 'TheTable';
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-12-31
        • 2010-09-11
        • 2014-12-15
        • 2017-07-18
        • 2015-04-30
        • 1970-01-01
        • 2021-07-20
        相关资源
        最近更新 更多