title: Python giving 'psycopg2.DataError: cannot EXECUTE a null querystring' error for Postgres function exeuction
body: <p>I am trying to execute the following Postgres function using Python. The 
  cur.execute statement basically executes the test_schema.f_cdrivers function.</p>
  
  <pre><code>        conn = psycopg2.connect(database = "xxxxx", user = "xxxxx", password = "xxxxx", host = "xxxxxx", port = "9999")
          cur = conn.cursor()
          cur.execute('''
          SELECT test_schema.f_cdrivers(
          ' abcd.pi_ch_ixns_day_t1 ',
          ' abcd.ChIxnData_t1 ',
          ' abcd.ChIxnDay_t1 ',
          ' abcd.ChIxnMatrixDay_t1' ,
          'day',
          'xy')      
          ;''')
  </code></pre>
  
  <p>However I get the following error in the last line:</p>
  
  <p>File "test.py", line 35, in 
  ;''')
  psycopg2.DataError: cannot EXECUTE a null querystring</p>
  
  <p>I am guessing the last parameter 'xy' getting input as empty in to the function.I tried playing around with the last line, but I am not able to figure out the error. I am able to run other functions with similar setup, but just this alone gives error.</p>