无论是在pgadmin还是直接调试?

解决方案 »

  1.   

    个人认为存储过程的调试在于将存储过程中每一步骤中的值输出出来。顺序为从上至下。如有嵌套,从外到里。
    如:
    存储过程内设置变量,通过循环处理变量。
    declare @i int;
    set @i = 1 ;
    -- 第一步跟踪
    -- select @i;
    while @i <100 do
     set s = concat(s,@i);
    -- 第二步跟踪  此处也可以设置临时表,将每一步骤值插入临时表中,以select * from temptable 形式结束存储过程。
     select s ;
      

  2.   

    Two way.
    1、pgadmin
    2、command line tool named psql.
      

  3.   

    http://blog.chinaunix.net/u/17549/showart_1078667.html仅供参考 安装edb-debugger
      

  4.   

    谢谢啊,不过暂时没有怎么用postgre
    以后试试