You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/plugins/db_manager/db_plugins/plugin.py
+1-16Lines changed: 1 addition & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1096,22 +1096,7 @@ def definition(self):
1096
1096
returntxt
1097
1097
1098
1098
defgetComment(self):
1099
-
"""Returns the comment for a field"""
1100
-
tab=self.table()
1101
-
# SQL Query checking if a comment exists for the field
1102
-
sql_cpt="Select count(*) from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tab.name, self.name)
1103
-
# SQL Query that return the comment of the field
1104
-
sql="Select pd.description from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tab.name, self.name)
# Check with SQL query if a comment exists for the field
519
+
sql_cpt="Select count(*) from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tablename, fld.name)
520
+
# Get the comment for the field with SQL Query
521
+
sql="Select pd.description from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tablename, fld.name)
# SQL Query checking if a comment exists for the field
407
+
sql_cpt="Select count(*) from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tab.name, self.name)
408
+
# SQL Query that return the comment of the field
409
+
sql="Select pd.description from pg_description pd, pg_class pc, pg_attribute pa where relname = '%s' and attname = '%s' and pa.attrelid = pc.oid and pd.objoid = pc.oid and pd.objsubid = pa.attnum"% (tab.name, self.name)
returnu""" "%s".ROWID IN (\nSELECT ROWID FROM SpatialIndex WHERE f_table_name='%s' AND search_frame="%s"."%s") """% (src_table, src_table, dest_table, dest_column)
0 commit comments