Menu

#115 1.9.0 to 1.10.0 upgrade leads to error with PostgreSQL backend

None
open
nobody
None
1
2022-06-03
2022-06-03
Anonymous
No

I upgraded from 1.9.0 to 1.10.0 today. My backend uses pgsql.
The first time I logged I got asked to update the db schema, and everything was ok.
The second time I loaded the page I got the error that the db is not available.
Here is what is logged on the web server:

[Fri Jun 03 16:02:46 2022] [notice] [client 131.154.5.26] Uncaught exception 'MRBS\\DBException' in /var/www/html/mrbs/lib/MRBS/DB.php at line 171
SQLSTATE[42803]: Grouping error: 7 ERROR:  column "e.start_time" must appear in the GROUP BY clause or be used in an aggregate function
RIGA 1: SELECT E.*, COUNT(P.entry_id) AS n_registered
^
SQL: SELECT E.*, COUNT(P.entry_id) AS n_registered            FROM mrbs_entry E       LEFT JOIN mrbs_room R ON E.room_id = R.id       LEFT JOIN mrbs_participants P ON P.entry_id = E.id           WHERE R.area_id = ?             AND R.disabled = 0             AND start_time < ? AND end_time > ?        GROUP BY E.id        ORDER BY start_time, E.id\nParams: Array\n(\n    [0] => 1\n    [1] => 1654275600\n    [2] => 1654232400\n)\n\n#0 /var/www/html/mrbs/mrbs_sql.inc(777): MRBS\\DB->query('SELECT E.*, COU...', Array)
#1 /var/www/html/mrbs/functions_table.inc(651): MRBS\\get_entries_by_area(1, 1654232400, 1654275600)
#2 /var/www/html/mrbs/index.php(431): MRBS\\day_table_innerhtml('day', '2022', '06', '03', 1, 26, NULL)
#3 {main}

MRBS GET: Array
(
)
MRBS POST: Array
(
)
MRBS SESSION: Array
(
[csrf_token] => 47f10487fc040cca117fbc1a9ab0dc7847780a1a1e4d0f55eb6e733b55e322f9
)

I noticed a patch is available only for mysql.
Any hint on how to solve?
THanks.

Discussion

  • Anonymous

    Anonymous - 2022-06-03

    Sorry in the title I indicated the wrong versions!

     
  • Campbell Morrison

    What version of PostgreSQL are you using?

     
  • Campbell Morrison

    I noticed a patch is available only for mysql.

    And where did you see this patch?

     
  • John Beranek

    John Beranek - 2022-06-03
    • summary: 1.4.9 to 1.4.10 pgsql error --> 1.9.9 to 1.10.0 upgrade leads to error with PostgreSQL backend
     
  • John Beranek

    John Beranek - 2022-06-03
    • summary: 1.9.9 to 1.10.0 upgrade leads to error with PostgreSQL backend --> 1.9.0 to 1.10.0 upgrade leads to error with PostgreSQL backend
     
  • John Beranek

    John Beranek - 2022-06-03

    Ticket moved from /p/mrbs/patches/114/

     
  • John Beranek

    John Beranek - 2022-06-03

    Hmm, moved the ticket but just noticed you're not logged in, so may not see it...I'll move it back...

     
  • John Beranek

    John Beranek - 2022-06-03

    Ticket moved from /p/mrbs/bugs/526/