Thread

Commits

  1. Fix handling of pgbench's hash when no argument is provided

  1. pgbench - very minor bug fix on hash() missing argument

    Fabien COELHO <coelho@cri.ensmp.fr> — 2018-07-27T03:16:06Z

    While doing something else, I noticed that pgbench's hash() does not fail 
    gracefully:
    
      sh> cat hash.sql
      \set i hash()
    
      sh> pgbench -f hash.sql -t 1
      ...
      cannot coerce (null) to int
      client 0 aborted in command 0 (set) of script 0; evaluation of meta-command failed
    
    The message is not very helful. With the attached one-line patch plus 
    test, it is clearer:
    
      sh> pgbench -f hash.sql -t 1
      hash.sql:1: unexpected number of arguments (hash) in command "set"
      \set i hash()
                  ^ error found here
    
    Could be backpatched to 11 where hash was introduced.
    
    -- 
    Fabien.
  2. Re: pgbench - very minor bug fix on hash() missing argument

    Michael Paquier <michael@paquier.xyz> — 2018-07-27T04:44:58Z

    On Thu, Jul 26, 2018 at 11:16:06PM -0400, Fabien COELHO wrote:
    > Could be backpatched to 11 where hash was introduced.
    
    Thanks, committed and back-patched.  I have added some tests for least()
    and greatest() on the way.
    --
    Michael
    
  3. Re: pgbench - very minor bug fix on hash() missing argument

    Fabien COELHO <coelho@cri.ensmp.fr> — 2018-07-27T11:53:50Z

    Hello Michaël,
    
    > Thanks, committed and back-patched.
    
    Ok.
    
    > I have added some tests for least() and greatest() on the way.
    
    Good!
    
    Thanks,
    
    -- 
    Fabien.