Skip to content

Commit

Permalink
Correct bug from postgres comment using quote or caps
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailurupoda committed Feb 27, 2020
1 parent f2b2e96 commit d87843c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/postgis/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def commentTable(self, schema, tablename, comment=None):
if comment is None:
self._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS NULL;'.format(schema, tablename))
else:
self._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS E\'{2}\';'.format(schema, tablename, comment))
self._execute(None, 'COMMENT ON TABLE "{0}"."{1}" IS $escape${2}$escape$;'.format(schema, tablename, comment))

def getComment(self, tablename, field):
"""Returns the comment for a field"""
Expand Down

0 comments on commit d87843c

Please sign in to comment.