diff --git a/LCS/PyCommon/postgres.py b/LCS/PyCommon/postgres.py
index ceefb87eab823eef7670f18ccb64dda6ca24b60c..2db1316e19116db9630de7d6e86256a892a02fd0 100644
--- a/LCS/PyCommon/postgres.py
+++ b/LCS/PyCommon/postgres.py
@@ -110,7 +110,7 @@ def makePostgresNotificationQueries(schema, table, action, view_for_row=None, vi
                table=table)
 
     sql = drop_sql + '\n' + function_sql + '\n' + trigger_sql
-    sql_lines = '\n'.join([s.strip() for s in sql.split('\n')])
+    sql_lines = '\n'.join([s.strip() for s in sql.split('\n')]) + '\n'
     return sql_lines
 
 class PostgresListener(object):