title: undefined method `empty?' for #<PG::Result:0x007fcc82900a78>
body: <p>We migrated our database from sqlite3 to postgreSQL. Now, at the following line, we get an error:</p>
  
  <pre><code>  def self.get_table_id(id)
      sql = "SELECT id FROM configtables WHERE parent = 'check' AND parentid = " + id.to_s
      results = connection.execute(sql)
      return nil if results.empty? # here's where the error happens
      return results[0][0]
    end
  </code></pre>
  
  <p>I have less knowledge of Ruby and ActiveRecords and with postgreSQL as well. Is the value in <code>results</code> a <code>postgres-object</code>, or whats <code>#&lt;PG::Result:0x007fcc82900a78&gt;</code> and what was it with the <code>sqlite3</code> database?</p>
  
  <p>This function is one of a few with raw sql-strings.</p>