bug fix pg no raster_columnes views
This commit is contained in:
parent
d4b181ff61
commit
c02da75f0b
@ -231,12 +231,20 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
cur.execute(custom_list)
|
||||
list_schema = cur.fetchall()
|
||||
|
||||
SQLraster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||
cur.execute(SQLraster)
|
||||
SQLcountRaster = """SELECT schemaname,viewname FROM pg_catalog.pg_views
|
||||
WHERE schemaname LIKE 'public' AND viewname LIKE 'raster_columns';"""
|
||||
cur.execute(SQLcountRaster)
|
||||
RasterIF = len(cur.fetchall())
|
||||
|
||||
if RasterIF == 1:
|
||||
SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||
cur.execute(SQLloadRaster)
|
||||
list_raster = cur.fetchall()
|
||||
RasterList = []
|
||||
for rasterFind in list_raster:
|
||||
RasterList.append(rasterFind[0])
|
||||
else:
|
||||
RasterList = []
|
||||
|
||||
self.tableWidget.setRowCount(len(list_schema))
|
||||
self.tableWidget.setColumnCount(4)
|
||||
@ -374,8 +382,8 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
# def displayOnWindows(type, uri, name):
|
||||
# p = []
|
||||
|
||||
SQLraster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||
cur.execute(SQLraster)
|
||||
SQLloadRaster = """SELECT concat(r_table_schema,'.',r_table_name) from public.raster_columns; """
|
||||
cur.execute(SQLloadRaster)
|
||||
list_raster = cur.fetchall()
|
||||
RasterList = []
|
||||
for rasterFind in list_raster:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user