# HG changeset patch # User Goffi # Date 1547307705 -3600 # Node ID 22832c1d2827622a003e90ea619b6eb803b2efca # Parent ded7657b03fa0018916fd69272979ae97655d66f storage (pgsql): don't specify table name in ORDER BY clause as it can cause troubles in some requests. diff -r ded7657b03fa -r 22832c1d2827 src/pgsql_storage.py --- a/src/pgsql_storage.py Thu Jan 10 08:42:49 2019 +0100 +++ b/src/pgsql_storage.py Sat Jan 12 16:41:45 2019 +0100 @@ -843,16 +843,16 @@ """ keys = ext_data.get('order_by') if not keys: - return u'ORDER BY items.updated ' + direction + return u'ORDER BY updated ' + direction cols_statmnt = [] for key in keys: if key == 'creation': - column = 'items.item_id' # could work with items.created too + column = 'item_id' # could work with items.created too elif key == 'modification': - column = 'items.updated' + column = 'updated' else: log.msg(u"WARNING: Unknown order by key: {key}".format(key=key)) - column = 'items.updated' + column = 'updated' cols_statmnt.append(column + u' ' + direction) return u"ORDER BY " + u",".join([col for col in cols_statmnt])