perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 8 Jul 2019 05:52:31 +0000 (08:52 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jul 2019 13:13:27 +0000 (10:13 -0300)
commitd8d051df9f906232715282cc0570c94273b197bc
tree7f1a54f17b592e8c522066837649d9286e6d84f0
parentceb75476db1617a88cc29b09839acacb69aa076e
perf scripts python: export-to-postgresql.py: Fix DROP VIEW power_events_view

PostgreSQL can error if power_events_view is not dropped before its
dependent tables e.g.

  Exception: Query failed: ERROR:  cannot drop table mwait because other
  objects depend on it
  DETAIL:  view power_events_view depends on table mwait

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: aba44287a224 ("perf scripts python: export-to-postgresql.py: Export Intel PT power and ptwrite events")
Link: http://lkml.kernel.org/r/20190708055232.5032-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/scripts/python/export-to-postgresql.py