title: How to make a function use CASE and IFNULL in postgreSQL?
body: <p>can you tell me how to use CASE and IFNULL in postgre? i'm migrating from sql to postgreSQL, and i want to make a function with this syntax :</p>
  
  <pre><code>SELECT a.furniture_id, a.furniture_brand, a.furniture_cost, 
  CASE 
    WHEN furniture_id = f_id THEN a.furniture_content 
    ELSE '' 
  END CONTENT 
     FROM tb_furniture a
     WHERE 
      (IFNULL(a.sale_id,0) = IFNULL(f_id,0) OR (a.furniture_id = f_Id AND IFNULL(a.furniture_content,'') &gt; '')) 
      AND a.published = 1;
  </code></pre>
  
  <p>thanks before(y)</p>