1108: RB RC1 uses SQL incompatible with PostgreSQL

ger***@sayg**** (Google Code) (Is this you? Claim this profile.)
May 6, 2009
1099
What version are you running?
1.0RC1

What's the URL of the page containing the problem?
Internal site

What steps will reproduce the problem?
1. Run RB on "postgresql_psycopg2" engine.

What is the expected output? What do you see instead?
HTTP 500 error on all RB pages.  Traceback logged (contents below).  My 
guess is that some SQL is incompatible with postgresql.

What operating system are you using? What browser?
Linux, Ubuntu Hardy
All browsers on all platforms.

Please provide any additional information below.

On a different note, ReviewBoard-1.0beta3.dev_20090402 works perfectly on 
the same platform/database engine.

Here's the traceback generated:
Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
auth/util.py", line 45, in _checklogin
    return view_func(request, *args, **kwargs)

  File "/usr/lib/python2.5/site-packages/ReviewBoard-1.0rc1-py2.5.egg/
reviewboard/accounts/decorators.py", line 43, in _check_valid_prefs
    return view_func(request, *args, **kwargs)

  File "/usr/lib/python2.5/site-packages/ReviewBoard-1.0rc1-py2.5.egg/
reviewboard/reviews/views.py", line 309, in dashboard
    return grid.render_to_response(template_name)

  File "/usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py", line 556, in render_to_response
    self.load_state()

  File "/usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py", line 452, in load_state
    self.precompute_objects()

  File "/usr/lib/python2.5/site-packages/Djblets-0.5rc1-py2.5.egg/djblets/
datagrid/grids.py", line 509, in precompute_objects
    for obj in self.page.object_list:

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py", line 185, in _result_iter
    self._fill_cache()

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py", line 618, in _fill_cache
    self._result_cache.append(self._iter.next())

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/query.py", line 275, in iterator
    for row in self.query.results_iter():

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/sql/query.py", line 206, in results_iter
    for rows in self.execute_sql(MULTI):

  File "/usr/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/
django/db/models/sql/query.py", line 1734, in execute_sql
    cursor.execute(sql, params)

ProgrammingError: column "reviews_review.timestamp" must appear in the 
GROUP BY clause or be used in an aggregate function
chipx86
#1 chipx86
Dup of bug 1099. Go ahead and five the latest nightly a try and let me know if it
works for you in that bug.