Commits

yerokhin  committed 6f5eac5

View introspection fixed

  • Participants
  • Parent commits 9f62cca

Comments (0)

Files changed (1)

File src/htsql_pgsql/rulesparser.py

         rtable = self.find_rtable(query)
         relid = int(rtable.relid)
         if relid not in tablemap:
+            # not introspected table
             return []
         o_table = tablemap[relid]
         o_pkey = None
                     and target.resorigtbl != '0' \
                     and target.resjunk != 'true':
                 colname = rtablemap[target.resorigtbl].eref.colnames[int(target.resorigcol) - 1].strip('"')
+                if int(target.resorigtbl) not in tablemap:
+                    # not introspected table
+                    continue
                 table_entity = tablemap[int(target.resorigtbl)]
                 ref_column = self.get_key_column(table_entity, colname)
                 item = ref_column