Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-821

Inner function does not exist while invoking from outer function on mac osx

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.0.0.0-incubating
    • 2.0.0.0-incubating
    • Query Execution
    • None

    Description

      In suite of function basics in new feature test framework, inner function does not exist while invoking from outer function on mac osx. It works on rhel 6.x.

      -- 1. prepare schema and data
      DROP TABLE IF EXISTS foo;
      CREATE TABLE foo AS SELECT * FROM generate_series(1, 10) x;
      
      CREATE FUNCTION inner(int) RETURNS INTEGER AS 'SELECT 1' LANGUAGE SQL IMMUTABLE;
      
      CREATE FUNCTION outer(x INT) RETURNS INT AS $$
      BEGIN
      RETURN inner(x);
      END
      $$ LANGUAGE PLPGSQL;
      
      -- 2. run query on mac errors out with inner function does not exist
      SELECT outer(0);
       outer
      -------
           1
      (1 row)
      
      SELECT outer(0) FROM foo;
      ERROR:  function inner(integer) does not exist  (seg2 localhost:40000 pid=30499)
      DETAIL:  PL/pgSQL function "outer" line 2 at return
      
      -- 3. run query on rhel 6.x succeed
      SELECT outer(0);
       outer
      -------
           1
      (1 row)
      
      SELECT outer(0) FROM foo;
       outer
      -------
           1
           1
           1
           1
           1
           1
           1
           1
           1
           1
      (10 rows)
      
      -- 4. clean up
      DROP FUNCTION outer(int)
      DROP FUNCTION inner(int);
      

      Attachments

        Activity

          People

            huor Ruilong Huo
            huor Ruilong Huo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: