Skip to content

Commit

Permalink
adding support for getting list of foreign tables for PostgreSQL (apa…
Browse files Browse the repository at this point in the history
…che#3856)

* adding support for getting list of foreign tables for PostgreSQL

* need extra newline to pass lint
  • Loading branch information
mike-schiller authored and michellethomas committed May 23, 2018
1 parent 566c450 commit 208634f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions superset/db_engine_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ def epoch_to_dttm(cls):
def convert_dttm(cls, target_type, dttm):
return "'{}'".format(dttm.strftime('%Y-%m-%d %H:%M:%S'))

@classmethod
def get_table_names(cls, schema, inspector):
"""Need to consider foreign tables for PostgreSQL"""
tables = inspector.get_table_names(schema)
tables.extend(inspector.get_foreign_table_names(schema))
return sorted(tables)


class Db2EngineSpec(BaseEngineSpec):
engine = 'ibm_db_sa'
Expand Down

0 comments on commit 208634f

Please sign in to comment.