プロジェクト

全般

プロフィール

Vote #80455

未完了

Group results is different between MySQL and PostgreSQL

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues filter_56
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
56
version_id:
0
issue_org_id:
32404
author_id:
428180
assigned_to_id:
0
comments:
3
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Recently we've migrated a huge DB from MySQL to PostgreSQL. And noticed a small difference with Group results by function.

As you see the screenshot below, MySQL shows (blank) group first but PostgreSQL shows (blank) group last.

!PostgreSQL-MySQL-NULL.png!

I guess it is because NULLS LAST is the default for ASC order in PostgreSQL.
Can you enforce NULLS FIRST in the SQL query to postgres?
https://www.postgresql.org/docs/8.3/queries-order.html

We believe that it would be very much appreciated since many of our users want to group issues by assignee to find unassigned issues. Also it would be nice if Redmine works consistently irrespective of db engines.

  Redmine version                3.4.11.stable
  Ruby version                   2.4.6-p354 (2019-04-01) [x86_64-linux]
  Rails version                  4.2.11.1
  Database adapter               PostgreSQL

Thank you.


journals

I found a patch #25066 which is for a similar point but it is doing more than fixing the diff.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
https://www.redmine.org/builds/logs/build_trunk_postgresql_ruby-2.6_803.html
I think the reason why the test failed with TimelogControllerTest#test_index_grouped_by_issue is the same.
--------------------------------------------------------------------------------


related_issues

relates,New,25066,Sort order with null placement (NULLS FIRST, NULLS LAST)

Admin Redmine さんが約4年前に更新

  • カテゴリIssues filter_56 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0