title: function does not exist in pg_proc in postgresql
body: <p>I tried to call my user defined function in pgresql from C# code,</p>
  
  <p>my function creation script is as follows,</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION public."GetUserDailyData"(
      cid integer,
      hid integer,
      currday integer)
    RETURNS character varying AS
  $BODY$
  DECLARE
    returndata varchar = '';
  BEGIN
  
  SELECT data-&gt;20+currday into returndata FROM pops
  WHERE hybid = hid and cropid = cid;
  
  return returndata;
  END
  $BODY$
    LANGUAGE plpgsql
    COST 100;
  </code></pre>
  
  <p>My method to call this function is as follows,</p>
  
  <pre><code>public static object ExecuteScalar(string conString, string spName, NpgsqlParameter[] param)
          {
              using (var conn = new NpgsqlConnection(conString))
              {
                  conn.Open();
                  using (var tran = conn.BeginTransaction())
                  using (var command = conn.CreateCommand())
                  {
                      command.CommandText = spName;
                      command.CommandType = CommandType.StoredProcedure;
  
                      for (var i = 0; i &lt; param.Length; i++)
                      {
                          command.Parameters.Add(new NpgsqlParameter());
                          command.Parameters[i] = param[i];
                      }
  
                      var result = command.ExecuteScalar();
                      return result;
                  }
              }
          }
  </code></pre>
  
  <p>I tried everything even checked the existence of this function in pg_proc using </p>
  
  <pre><code>select * from pg_proc where proname = 'GetUserDailyData' 
  </code></pre>
  
  <p>and it reflected the function details row.</p>
  
  <p>But every time it is giving the same error.</p>
  
  <p>Any kind of suggestion would be highly appreciated. Thanks.</p>