title: Error while invoking a stored procedure from java
body: <p>I have written a following stored procedure in a <code>postgres</code> database</p>
  
  <pre><code>create or replace function reviseTax(revisiondate date, taxrate decimal) returns         table(employeeid integer, month date, difference decimal) AS $$
  declare
      thisrow record;
      newTaxAmt decimal;
      differenceAmt decimal;
  begin 
  for thisrow in select * from employee_salary where salarydate &gt;= revisiondate loop
      newTaxAmt = thisrow.income * $2;
      differenceAmt = newTaxAmt - thisrow.tax;
      update employee_salary es set tax = newTaxAmt where es.employeeid = thisrow.employeeid;
      insert into taxrevision (employeeid , month , difference) values (thisrow.employeeid , thisrow.salarydate , differenceAmt);
  
  end loop;
  return query select * from taxrevision as something;
  end $$ language plpgsql;
  </code></pre>
  
  <p>This works fine when invoked from the data base.
  The problem is when I invoke this stored procedure from java using JDBC code </p>
  
  <p>My java code is as follows</p>
  
  <pre><code>System.out.println("Enter the effective date(yyyy-mm-dd) for the tax revision");
  dateString = scanner.next();
  float newTaxRate = 0.3F;
  
  SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
  df.setLenient(false);
  java.util.Date utilDate = df.parse(dateString);
  java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
  
  CallableStatement callable = DBConnection.prepareCall("{call revisetax(?,?)}");
  callable.setDate(1,sqlDate);
  callable.setFloat(2,newTaxRate);
  callable.executeQuery();
  DBConnection.commit();
  </code></pre>
  
  <p>I am getting the following error :</p>
  
  <pre><code>ERROR: function revisetax(unknown, real) does not exist
    Hint: No function matches the given name and argument types. You might need to add             explicit type casts.
    Position: 14
  </code></pre>
  
  <p>I am not able to figure out why, please help!</p>