title: sql: expected 0 arguments, got 2
body: <p>I'm struggling to properly utilize <code>sqlx</code> and the <code>pq</code> driver for Postgres to create a row in the database. Let's start simple:</p>
  
  <p>I have a <code>user</code>, <code>role</code> and <code>user_role</code> table. I want to insert a role into the database and get the ID of the inserted row. This works flawlessly using the following sql:</p>
  
  <p><code>const createRoleSQL = "INSERT INTO role (name) VALUES (:name) RETURNING id"</code></p>
  
  <p>To make that work in go, I prepare the statement at some point:</p>
  
  <pre><code>createStmt, err := db.PrepareNamed(createRoleSQL)
  if err != nil {
      // ...
  }
  </code></pre>
  
  <p>When creating, I run the query as part of a transaction <code>tx</code>. <code>role</code> is obviously a struct with the correct fields and <code>db</code> tags:</p>
  
  <pre><code>if err := tx.NamedStmt(createStmt).QueryRow(role).Scan(&amp;role.ID); err != nil {
      // ...
  }
  </code></pre>
  
  <p>This works perfectly fine.</p>
  
  <p>Now I wanted to extend that and insert a new role and assign it to a user:</p>
  
  <pre><code>const createUserRoleSQL = `
  DO $$
  DECLARE role_id role.id%TYPE;
  BEGIN
      INSERT INTO role (name) VALUES ($2) RETURNING id INTO role_id;
      INSERT INTO user_role (user_id, role_id) VALUES ($1, role_id);
  END $$`
  
  createStmt, err := db.Preparex(createUserRoleSQL)
  if err != nil {
      // ...
  }
  
  if err := tx.Stmtx(createStmt).QueryRow(userID, role.Name).Scan(&amp;role.ID); err != nil {
      // ...
  }
  </code></pre>
  
  <p>Unfortunately this fails with <code>sql: expected 0 arguments, got 2</code>. Is it possible to achieve what I want to do, with a single query?</p>