title: How to call a function, PostgreSQL
body: <p>I'm trying to use a function with PostgreSQL to save some data. Here is the create script:</p>
  <pre><code>-- Function: &quot;saveUser&quot;(integer, character varying, character varying, character varying, character varying, character varying)
  
  -- DROP FUNCTION &quot;saveUser&quot;(integer, character varying, character varying, character varying, character varying, character varying);
  
  CREATE OR REPLACE FUNCTION &quot;saveUser&quot;(&quot;pUserID&quot; integer, &quot;pName&quot; character
  varying, &quot;pLastName&quot; character varying, &quot;pUserName&quot; character varying, 
  &quot;pPassword&quot; character varying, &quot;peMail&quot; character varying)
  RETURNS boolean AS
  $BODY$
  BEGIN
  SELECT 1
  FROM &quot;USERS&quot;
  WHERE &quot;userID&quot; = $1;
  
  IF FOUND THEN
  UPDATE &quot;USERS&quot; 
      SET     &quot;name&quot; = $2,
      &quot;lastName&quot; = $3,
      &quot;userName&quot; = $4,
      &quot;password&quot; = $5,
      &quot;eMail&quot; = $6
  WHERE &quot;userID&quot; = $1;
  ELSE
      INSERT INTO &quot;USERS&quot;
      (&quot;name&quot;, &quot;lastName&quot;, &quot;userName&quot;, &quot;password&quot;, &quot;eMail&quot;)
      VALUES
          ($2, $3, $4, $5, $6);
  END IF;
  END;$BODY$
    LANGUAGE 'plpgsql' VOLATILE
    COST 100;
  ALTER FUNCTION &quot;saveUser&quot;(integer, character varying, character varying, character varying, character varying, character varying) OWNER TO postgres;
  </code></pre>
  <p>PostreSQL Documentation states that to call a function which does not return any resultset, it is sufficient to write only its name and properties. So I try to call the function like this:</p>
  <pre><code>&quot;saveUser&quot;(3, 'asd','asd','asd','asd','asd');
  </code></pre>
  <p>But I get the error below:</p>
  <pre><code>ERROR:  syntax error at or near &quot;&quot;saveUser&quot;&quot;
  LINE 1: &quot;saveUser&quot;(3, 'asd','asd','asd','asd','asd')
       ^
  
  ********** Error **********
  
  ERROR: syntax error at or near &quot;&quot;saveUser&quot;&quot;
  SQL state: 42601
  Character: 1
  </code></pre>
  <p>I have other functions which return a resultset. I use <code>SELECT * FROM &quot;fnc&quot;(...)</code> to call them and it works. Why am I getting this error?</p>
  <hr />
  <p><strong>EDIT:</strong> I am using pgAdmin III Query tool and trying to execute the SQL Statements there.</p>