Uploaded image for project: 'Apache HAWQ (Retired)'
  1. Apache HAWQ (Retired)
  2. HAWQ-405

Issue with handling pg_temp schema

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 2.0.0.0-incubating
    • 2.0.0.0-incubating
    • Hcatalog, PXF
    • None

    Description

      We aren't handling the temp namespace the right way when LookupNamespaceId is invoked.
      This change was done as part of handling hcatalog where we specifically handle the pg_temp schema.

      Steps to reproduce error
      Reproduction 1: invalid reference to FROM-clause entry for table

      create table pg_temp.test(row integer, count integer);
      
      insert into pg_temp.test values (1, 10), (2, 20), (3, 30);
      
      select avg(pg_temp.test.count) from pg_temp.test;
      ERROR:  invalid reference to FROM-clause entry for table "test"
      LINE 1: select avg(pg_temp.test.count) from pg_temp.test;
                         ^
      

      Reproduction 2: missing FROM-clause entry for table

      select case when pg_temp.test.count = 30 then 30 when pg_temp.test.count = 20 then 20 else 10 end;
      ERROR:  missing FROM-clause entry for table "test"
      LINE 1: select case when pg_temp.test.count = 30 then 30 when pg_tem...
      

      Attachments

        Issue Links

          Activity

            People

              shivram Shivram Mani
              shivram Shivram Mani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment