title: How to insert NUMERIC field type using lib/pq driver?
body: <p>I have a table where I have a field which stores a really big number (math.big, which is bigger than uint64). I am storing it in a DECIMAL type:</p>
  
  <pre><code>difficulty          NUMERIC     NOT NULL,
  </code></pre>
  
  <p>So, how do I insert this field from <code>Go</code> code using <code>PQ</code> library (<code>github.com/lib/pq</code>) ? </p>
  
  <p>This code does not work:</p>
  
  <pre><code>me@desk:~/src/github.com/myapp/misc$ cat insertbig.go
  package main
  
  import (
      "database/sql"
      _ "github.com/lib/pq"
      "os"
      "log"
      "math/big"
  )
  func main() {
      var err error
      var db *sql.DB
      std_out:=log.New(os.Stdout,"",0)
  
      conn_str:="user='testuser' dbname='testdb' password='testpasswd'";
      db,err=sql.Open("postgres",conn_str);
      if (err!=nil) {
          log.Fatal(err);
      }
      _,err=db.Exec("CREATE TABLE bigtable(difficulty NUMERIC)");
  
      difficulty:=big.NewInt(0);
      difficulty.SetString("1111111111111111111111111111111111111111111111111111111111111111111111",10);
      _,err=db.Exec("INSERT INTO bigtable(difficulty) VALUES(?)",difficulty);
      if (err!=nil) {
          log.Fatal(err);
      } else {
          std_out.Println("record was inserted");
      }
  }
  
  me@desk:~/src/github.com/myapp/misc$ 
  </code></pre>
  
  <p>It gives me this error:</p>
  
  <pre><code>2018/02/05 17:00:25 sql: converting argument $1 type: unsupported type big.Int, a struct
  </code></pre>