title: PostgreSQL equivalent for TOP n WITH TIES: LIMIT "with ties"?
body: <p>I'm looking for something similar this in SQL Server:</p>
  
  <pre><code>SELECT TOP n WITH TIES FROM tablename
  </code></pre>
  
  <p>I know about <code>LIMIT</code> in PostgreSQL, but does the equivalent of the above exist? I'm just curious as it would save an extra query each time for me.</p>
  
  <p>If I have a table <code>Numbers</code> with attribute <code>nums</code>: <code>{10, 9, 8, 8, 2}</code>. I want to do something like:</p>
  
  <pre><code>SELECT nums FROM Numbers ORDER BY nums DESC LIMIT *with ties* 3
  </code></pre>
  
  <p>It should return <code>{10, 9, 8, 8}</code> because it takes the top 3 plus the extra <code>8</code> since it ties the other one.</p>