title: How to query and handle a UUID created with go.uuid and inserted into PostgreSQL 11?
body: <p>I inserted in PostgreSQL table an UUID created with go.uuid :</p>
  
  <pre><code>import (
          "github.com/satori/go.uuid"
  ) 
  
  func main() {
          usid := uuid.Must(uuid.NewV4())
          fmt.Println("usid := uuid.Must(uuid.NewV4")
          fmt.Println(usid.String())
          res, err := stmt.Exec(cn, csn, ccn, id)
          if err != nil || res == nil {
                  log.Fatal(err)
          }
  }
  
      sStmt := "insert into basicuserinfo (cn, csn, ccn, appUserAccountID ) 
      values ($1, $2, $3, $4)"
      stmt, err := db.Prepare(sStmt)
      if err != nil {
              log.Fatal(err)
      }
      defer stmt.Close()
      fmt.Println("# Inserting values")
  </code></pre>
  
  <p>And actually a row is inserted in the postgreSQL db:</p>
  
  <pre><code>           cn  |  csn  |  ccn | id
                                | 2412fcd3-8712-4a0f-830a-d77bd4cf2195      
  </code></pre>
  
  <p>In order to query with golang variables I tried first, to use a prepared statement.
  First, using db.PrepareContext :</p>
  
  <pre><code>    sel := "SELECT appUserAccountID FROM basicuserinfo WHERE cn = $1 AND csn 
      = $2 AND ccn = $3"
  
       stmt, err = db.PrepareContext(ctx,sel)
      if err != nil {
              log.Fatal(err)
      }
      var utenteID string
      err = stmt.QueryRowContext(ctx,cn, csn, ccn).Scan(&amp;utenteID)
      log.Printf("ID= %s\n", utenteID)
      fmt.Println("aaaaaaaaa") // Just to check that the this line gets executed
  </code></pre>
  
  <p>Whose execution remains "idle", in stand-by, without ending and producing any output:</p>
  
  <pre><code>marco@pc01:~/go/marcoGolang/goPostgres$ go run pqExample00.go
  # Inserting values
  </code></pre>
  
  <p>Then I tried in this way, with db.Prepare():</p>
  
  <pre><code>    stmt, err = db.Prepare(sel)
      if err != nil {
              log.Fatal(err)
      }
      res, err = stmt.Exec(cnv, csnv, ccnv)
  </code></pre>
  
  <p>In this second case the execution seems ending successfully, but I do not know how to convert the sql.Result into a correct form which can be handled, for example simply displayed with fmt.Println() or getting other handlings.
  So... how to correctly query and handle a UUID created with go.uuid and inserted into PostgreSQL 11?</p>
  
  <p>Looking forward to your kind help.
  Marco</p>