title: RPostgreSQL and DBI: "operator does not exist: uuid = text"
body: <p>When using <code>dbReadTable</code> to read in database tables that uses UUID as the primary key, I get the following warning message.</p>
  
  <blockquote>
    <p>1: In postgresqlExecStatement(conn, statement, ...) :
      RS-DBI driver warning: (unrecognized PostgreSQL field type uuid (id:2950) in column 0)</p>
  </blockquote>
  
  <p>When I modify the table I loaded and try to update the database using, I get the following error message:</p>
  
  <blockquote>
    <p>Error in postgresqlExecStatement(conn, statement, ...) : 
      RS-DBI driver: (could not Retrieve the result : ERROR:  operator does not exist: uuid = text</p>
  </blockquote>
  
  <p><em>I get that the UUID type is not available in R, but is there a way that we can make the database believe the character vector "unique_id" is UUID instead of text?</em></p>
  
  <p>Code:</p>
  
  <pre><code>library(RPostgreSQL)
  library(postGIStools)
  pgdrv &lt;- dbDriver(drvName = "PostgreSQL")
  
  # === open connection
  db &lt;- DBI::dbConnect(pgdrv,
                       dbname="database",
                       host="localhost", port=5432,
                       user = 'postgres')
  
  # === get tables
  users &lt;- dbReadTable(db, "app_users")
  
  # === interaction with tables
  users$employee_has_quit[1:5] &lt;- TRUE
  
  # === update tables
  postgis_update(conn = db,
                 df = users,
                 tbl = "app_users",
                 id_cols = "unique_id",
                 update_cols = "employee_has_quit")
  
  # === close conncetion
  DBI::dbDisconnect(db)
  </code></pre>