title: Django queryset filter - Q() | VS __in
body: <p>What is the difference between</p>
  
  <pre><code>queryset.filter(Q(foo='bar') | Q(foo='baz'))
  </code></pre>
  
  <p>and</p>
  
  <pre><code>queryset.filter(foo__in=['bar', 'baz'])
  </code></pre>
  
  <p>I'm finding that sometimes they produce different results and I can't figure out why.</p>
  
  <p>I'm getting different results with these queries:</p>
  
  <pre><code>In [8]: Profile.objects.filter(image="").count()
  Out[8]: 7173
  
  In [9]: Profile.objects.filter(image=None).count()
  Out[9]: 25946
  
  In [10]: Profile.objects.filter(image__in=["", None]).count()
  Out[10]: 7173
  
  In [11]: Profile.objects.filter(Q(image="") | Q(image=None)).count()
  Out[11]: 33119
  </code></pre>
  
  <p>I'm using PostgreSQL as my database engine.</p>