title: Can't find django auth user with PostgreSQL
body: <pre><code>from django.contrib.auth.models import User as DjangoUser
  class Ward(models.Model):
      user = models.ForeignKey(DjangoUser, related_name='wards')
      group = models.ForeignKey(Group, related_name='wards')
  </code></pre>
  
  <p>This is my django model and I use this filter.</p>
  
  <pre><code>Group.objects.filter(wards__user=_user).all()
  </code></pre>
  
  <p>I used this code in sqlite3, it works well.</p>
  
  <p>But, it doesn't work in PostgreSQL.</p>
  
  <blockquote>
    <p>operator does not exist: character varying = integer
    LINE 1: ...rchive_ward"."group_id" ) WHERE "archive_ward"."user_id" = 1</p>
  </blockquote>
  
  <p>I think it is caused by <code>user_id</code> field in <code>archive_ward</code> tables.
  I found this field's data type is character.varying(20).</p>
  
  <p>What can I do for this code?</p>