首页 文章

我在哪里可以获得pldbgapi.sql以便为postgresql安装调试器?

提问于
浏览
9

我正在尝试在Linux上安装postgresql的调试器,所以我可以使用pgAdmin来调试我的函数 . 我已经设置了 postgresql.conf 文件 . 但是,我找不到 pldbgapi.sql .

Postgresql安装在 /usr/pgsql-9.2/ . 目录 /usr/pgsql-9.2/share/ 存在,但 /usr/pgsql-9.2/share/contrib 不存在 . 我在哪里可以找到该文件或下载它?

谢谢!

3 回答

  • 5

    我发现如果我运行这个文件的内容它是有效的

    share\extension\pldbgapi--1.0.sql
    

    这个自述文件的自述文件提到了不同的安装过程,我还没有尝试过

    http://git.postgresql.org/gitweb/?p=pldebugger.git;a=blob_plain;f=README.pldebugger;hb=54d993c04809da7cda79013a55b679a615c7dce1

  • 3

    优秀的机场,仅限:

    • 编辑postgresql.conf文件,并修改shared_preload_libraries配置选项,如下所示:

    shared_preload_libraries ='$ libdir / plugin_debugger'

    • 重新启动PostgreSQL以使新设置生效 .

    • 在要调试函数的数据库中运行以下命令:

    创建扩展pldbgapi;

    • 重新启动PostgreSQL以使新设置生效 . 最后你可以调试!!

    我在Postgres 9.4中使用过

  • 1

    这包含在EnterpriseDB分发中 . 你可以在pgFoundry上下载它 . here is a link

    还有git repo可用 .

    git clone git://git.postgresql.org/git/pldebugger.git
    cd pldebugger
    export USE_PGXS=1
    make
    make install
    

    编辑postgresql.conf

    vim /path/to/postgresql.conf
    

    加:

    shared_preload_libraries = 'plugin_debugger'
    

    重新启动postgres,连接到db并调用:

    CREATE EXTENSION pldbgapi;
    

    我在postgreql 9.5上使用它,效果很好 .

相关问题