title: Dynamic Limit in PostgreSQL
body: <p>I have function returning list of Employees, My requirement is if i pass Limit  to function than i should get result with limit and offset, If i don't pass limit than all the rows should be returned</p>
  
  <p>for example</p>
  
  <pre><code>When Limit is greater than 0(I am passing Limit as 10)
  Select * from Employees
  Limit 10 offset 0
  
  When Limit is equal to 0 than
  Select * from Employees
  </code></pre>
  
  <p>Is their any way to do such logic in function?</p>