mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
More helpful error messasge on Range order attempts
This commit is contained in:
parent
f70e6a1519
commit
b8b669611e
|
@ -132,7 +132,9 @@ class Range(object):
|
|||
return hash((self._lower, self._upper, self._bounds))
|
||||
|
||||
def __lt__(self, other):
|
||||
raise TypeError('Range objects are not ordered')
|
||||
raise TypeError(
|
||||
'Range objects cannot be ordered; please refer to the PostgreSQL'
|
||||
' documentation to perform this operation in the database')
|
||||
|
||||
__le__ = __gt__ = __ge__ = __lt__
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user