Thread

Commits

  1. Remove extra increment of plpgsql's statement counter for FOR loops.

  1. bugfix - plpgsql - statement counter is incremented 2x for FOR stmt

    Pavel Stehule <pavel.stehule@gmail.com> — 2021-02-02T17:20:46Z

    Hi
    
    When I fixed one plpgsql_check issue, I found another plpgsql issue. Now we
    have field nstatements that hold a number of plpgsql statements in
    function. Unfortunately I made an error when I wrote this functionality and
    for FOR statements, this counter is incremented 2x. Higher number than a
    real number is better than a lesser number, but it can be a source of
    problems too (inside plpgsql_check I iterate over 0 .. nstatements stmtid,
    and due this bug I had a problem with missing statements).
    
    Attached patch is pretty simple:
    
    Regards
    
    Pavel
    
  2. Re: bugfix - plpgsql - statement counter is incremented 2x for FOR stmt

    Tom Lane <tgl@sss.pgh.pa.us> — 2021-02-02T19:36:19Z

    Pavel Stehule <pavel.stehule@gmail.com> writes:
    > When I fixed one plpgsql_check issue, I found another plpgsql issue. Now we
    > have field nstatements that hold a number of plpgsql statements in
    > function. Unfortunately I made an error when I wrote this functionality and
    > for FOR statements, this counter is incremented 2x. Higher number than a
    > real number is better than a lesser number, but it can be a source of
    > problems too (inside plpgsql_check I iterate over 0 .. nstatements stmtid,
    > and due this bug I had a problem with missing statements).
    
    > Attached patch is pretty simple:
    
    Right, done.
    
    			regards, tom lane
    
    
    
    
  3. Re: bugfix - plpgsql - statement counter is incremented 2x for FOR stmt

    Pavel Stehule <pavel.stehule@gmail.com> — 2021-02-02T19:54:47Z

    út 2. 2. 2021 v 20:36 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
    
    > Pavel Stehule <pavel.stehule@gmail.com> writes:
    > > When I fixed one plpgsql_check issue, I found another plpgsql issue. Now
    > we
    > > have field nstatements that hold a number of plpgsql statements in
    > > function. Unfortunately I made an error when I wrote this functionality
    > and
    > > for FOR statements, this counter is incremented 2x. Higher number than a
    > > real number is better than a lesser number, but it can be a source of
    > > problems too (inside plpgsql_check I iterate over 0 .. nstatements
    > stmtid,
    > > and due this bug I had a problem with missing statements).
    >
    > > Attached patch is pretty simple:
    >
    > Right, done.
    >
    
    Thank you for commit
    
    Regards
    
    Pavel
    
    
    >                         regards, tom lane
    >