title: Does postgresql have a maximum number of where predicates?
body: <p>I wrote a very long query which has over 100 predicates in WHERE clause, but when I past it into POSTGRESQL environment, it reminds some AND in where clause are missing. If I delete some predicates, the results are correct, is this because there is maximum number of AND in where clause? thanks. </p>
  
  <p>Here is my query:</p>
  
  <pre><code>SELECT
  student12.id,
  student11.id,
  student10.id,
  student9.id ,
  student8.id ,
  student7.id ,
  student6.id ,
  student5.id ,
  student4.id ,
  student3.id ,
  student2.id ,
  student1.id 
  FROM
  student student12,
  student student11,
  student student10,
  student student9,
  student student8,
  student student7,
  student student6,
  student student5,
  student student4,
  student student3,
  student student2,
  student student1
  WHERE
  student1.id&lt;&gt;student12.id and
  student2.id&lt;&gt;student3.id and 
  student2.id&lt;&gt;student4.id and 
  student2.id&lt;&gt;student5.id and 
  student2.id&lt;&gt;student6.id and 
  student2.id&lt;&gt;student7.id and 
  student2.id&lt;&gt;student8.id and 
  student2.id&lt;&gt;student9.id and
  student2.id&lt;&gt;student10.id and
  student2.id&lt;&gt;student11.id and
  student2.id&lt;&gt;student12.id and
  student3.id&lt;&gt;student4.id and 
  student3.id&lt;&gt;student5.id and 
  student3.id&lt;&gt;student6.id and 
  student3.id&lt;&gt;student7.id and 
  student3.id&lt;&gt;student8.id and 
  student3.id&lt;&gt;student9.id and
  student3.id&lt;&gt;student10.id and
  student3.id&lt;&gt;student11.id and
  student3.id&lt;&gt;student12.id and
  student4.id&lt;&gt;student5.id and 
  student4.id&lt;&gt;student6.id and 
  student4.id&lt;&gt;student7.id and 
  student4.id&lt;&gt;student8.id and 
  student4.id&lt;&gt;student9.id and
  student4.id&lt;&gt;student10.id and
  student4.id&lt;&gt;student11.id and
  student4.id&lt;&gt;student12.id and
  student5.id&lt;&gt;student6.id and 
  student5.id&lt;&gt;student7.id and 
  student5.id&lt;&gt;student8.id and 
  student5.id&lt;&gt;student9.id and
  student5.id&lt;&gt;student10.id and
  student5.id&lt;&gt;student11.id and
  student5.id&lt;&gt;student12.id and
  student6.id&lt;&gt;student7.id and 
  student6.id&lt;&gt;student8.id and 
  student6.id&lt;&gt;student9.id and
  student6.id&lt;&gt;student10.id and
  student6.id&lt;&gt;student11.id and
  student6.id&lt;&gt;student12.id and
  student7.id&lt;&gt;student8.id and 
  student7.id&lt;&gt;student9.id and
  student7.id&lt;&gt;student10.id and
  student7.id&lt;&gt;student11.id and
  student7.id&lt;&gt;student12.id and
  student8.id&lt;&gt;student9.id and
  student8.id&lt;&gt;student10.id and
  student8.id&lt;&gt;student11.id and
  student8.id&lt;&gt;student12.id and
  student9.id&lt;&gt;student10.id and
  student9.id&lt;&gt;student11.id and
  student9.id&lt;&gt;student12.id and
  student10.id&lt;&gt;student11.id and
  student10.id&lt;&gt;student12.id and
  student11.id&lt;&gt;student12.id and
  
  student1.class2=student2.class2 AND
  student1.class2=student3.class1 AND
  student1.class2=student4.class1 AND
  student1.class1=student5.class1 AND
  student1.class1=student6.class1 AND
  student2.class2=student3.class1 AND
  student2.class2=student4.class1 AND
  student2.class1=student6.class2 AND
  student2.class1=student8.class2 AND
  student2.class1=student10.class2 AND
  student2.class1=student12.class2 AND
  student3.class1=student4.class1 AND
  student3.class2=student11.class1 AND
  student3.class2=student12.class1 AND
  student4.class2=student7.class2 AND
  student4.class2=student9.class2 AND
  student4.class2=student11.class2 AND
  student5.class1=student6.class1 AND
  student5.class2=student8.class1 AND
  student6.class2=student8.class2 AND
  student6.class2=student10.class2 AND
  student6.class2=student12.class2 AND
  student7.class2=student9.class2 AND
  student7.class2=student11.class2 AND
  student8.class2=student10.class2 AND
  student8.class2=student12.class2 AND
  student9.class2=student11.class2 AND
  student10.class2=student12.class2 AND
  student11.class1=student12.class1 and
  student1.sex=1 AND
  student2.sex=2 AND
  student3.sex=1 AND
  student4.sex=2 AND
  student5.sex=1 AND
  student6.sex=1 AND
  student7.sex=1 AND
  student8.sex=1 AND
  student9.sex=1 AND
  student10.sex=1 AND
  student11.sex=1 AND
  student12.sex=1 and
  student1.id&lt;&gt;student2.id and 
  student1.id&lt;&gt;student3.id and 
  student1.id&lt;&gt;student4.id and 
  student1.id&lt;&gt;student5.id and 
  student1.id&lt;&gt;student6.id and 
  student1.id&lt;&gt;student7.id and 
  student1.id&lt;&gt;student8.id and 
  student1.id&lt;&gt;student9.id and
  student1.id&lt;&gt;student10.id and
  student1.id&lt;&gt;student11.id;
  </code></pre>
  
  <p>and the output error is </p>
  
  <pre><code>test-#  student1.id&lt;&gt;student7.id and 
  test-#  student1.i
  test-#  student1.id&lt;&gt;stude
  test-#  student1.id&lt;&gt;stude
  test-#  student1.id&lt;&gt;stude
  ERROR:  syntax error at or near "student1"
  LINE 132:  student1.id&lt;&gt;stude
         ^
  </code></pre>