title: json.RawMessage from database/sql json column getting overwritten
body: <p>Getting strange behaviour with a struct with embedded json.</p>
  
  <pre><code>package main
  
  import (
      "database/sql"
      "encoding/json"
      "fmt"
  
      _ "github.com/lib/pq"
  )
  
  type Article struct {
      Id  int
      Doc *json.RawMessage
  }
  
  func main() {
      db, err := sql.Open("postgres", "postgres://localhost/json_test?sslmode=disable")
      if err != nil {
          panic(err)
      }
  
      _, err = db.Query(`create table if not exists articles (id serial primary key, doc json)`)
      if err != nil {
          panic(err)
      }
      _, err = db.Query(`truncate articles`)
      if err != nil {
          panic(err)
      }
      docs := []string{
          `{"type":"event1"}`,
          `{"type":"event2"}`,
      }
      for _, doc := range docs {
          _, err = db.Query(`insert into articles ("doc") values ($1)`, doc)
          if err != nil {
              panic(err)
          }
      }
  
      rows, err := db.Query(`select id, doc from articles`)
      if err != nil {
          panic(err)
      }
  
      articles := make([]Article, 0)
  
      for rows.Next() {
          var a Article
          err := rows.Scan(
              &amp;a.Id,
              &amp;a.Doc,
          )
          if err != nil {
              panic(err)
          }
          articles = append(articles, a)
          fmt.Println("scan", string(*a.Doc), len(*a.Doc))
      }
  
      fmt.Println()
  
      for _, a := range articles {
          fmt.Println("loop", string(*a.Doc), len(*a.Doc))
      }
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>scan {"type":"event1"} 17
  scan {"type":"event2"} 17
  
  loop {"type":"event2"} 17
  loop {"type":"event2"} 17
  </code></pre>
  
  <p>So the articles end up pointing to the same json.</p>
  
  <p>Am I doing something wrong?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Edited to a runnable example. I'm using Postgres and <code>lib/pq</code>.</p>