ipdevinfo crash: could not identify an ordering operator for type point
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
Trying to browse a router in NAV 3.7.x gave this error:
-----
Environment:
Request Method: GET
Request URL: http://
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['nav.django']
Installed Middleware:
('django.
'django.
'django.
Traceback:
File "/var/lib/
86. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/
347. netbox, port_view_
File "/usr/local/
250. module, perspective, activity_interval))
File "/usr/local/
55. ports = module_
File "/usr/local/
355. interface_names = [p.ifname for p in ports]
File "/var/lib/
185. self._fill_cache()
File "/var/lib/
618. self._result_
File "/var/lib/
275. for row in self.query.
File "/var/lib/
206. for rows in self.execute_
File "/var/lib/
1734. cursor.execute(sql, params)
File "/var/lib/
19. return self.cursor.
Exception Type: ProgrammingError at /ipdevinfo/
Exception Value: could not identify an ordering operator for type point
HINT: Use an explicit ordering operator or modify the query.
Changed in nav: | |
status: | Fix Committed → Fix Released |
This is caused by PostgreSQL because Django issues a query using DISTINCT and involving the room table. PostgreSQL has no default ordering behavior for the POINT data type, which causes problems when ordering of the new room.location column is needed.
Suggested fix is to define a bunch of ordering operator for the POINT data type in the NAV database. It's probably a lot simpler then to make sure Django never issues room-related queries where the location ordering matters to PostgreSQL.