title: POSTGRES: function accepting a hashmap or similar type as argument
body: <p>Is there a way to pass hashmap (or similar data type) to a postgres function as an argument?</p>
  
  <p>I am trying to get a function that can accept different no. of arguments in different cases. And I dont want to pass nulls or 0's for those arguments that are not relevant to a particular caller.</p>
  
  <p>Example of what I am trying to achieve (excuse the pseudocode)</p>
  
  <pre><code>function(hashmap map) {
  condition = 'where ';
   for (entry : map) {
    condtion = condition || map.key || '=' || map.value;
   }
    sql := sql || condition;
    //execute sql
  }
  </code></pre>
  
  <p>Is there a way to achieve this in postgres?</p>