title: what is best/right way to call postgres function or stored procedure from nodejs
body: <p>I am using "pg" module to handle with postgresql db ,what how to call function using pg i have doubt, </p>
  
  <p>I am calling function using query method,</p>
  
  <pre><code>client.query("SELECT * FROM SQSP_IsUserNameExists($1)",[userName], function(err, result) {
    // some code.
  
  });
  </code></pre>
  
  <p>that is working fine, but is this right way to call postgresql functions.</p>