PostgreSQL sorts and compares text by the database collation, unlike the other providers

Offen
#3,308 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp, postgresql
Bereich
database

Rechercherichtung

Start with src/FluentCMS.Data.PostgreSql/PostgreSqlStorageConventions.cs and compare its text-column configuration with src/FluentCMS.Data.SqlServer/SqlServerStorageConventions.cs; then read the base method in src/FluentCMS.Core/Storage/StorageConventions.cs. Locate the specification around lines 524–527, provider tests, content migration patterns, and release notes. Done means text sorting and range filters agree across providers, existing PostgreSQL content tables are migrated, and a regression test fails before the fix.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:storage type:bug

Problem

src/FluentCMS.Data.PostgreSql/PostgreSqlStorageConventions.cs does not override ConfigureTextColumn (the base is a no-op, src/FluentCMS.Core/Storage/StorageConventions.cs:28). SQL Server sets a binary collation (src/FluentCMS.Data.SqlServer/SqlServerStorageConventions.cs:31, from #2874) and SQLite compares bytes. On PostgreSQL, sort order and lt/gt on text follow the database collation, so the same query returns a different order or a different set than on the other providers.

Proposal

Use the C collation on content text columns in PostgreSQL, with a content migration for existing tables. Add the line to the specification next to the SQL Server one (lines 524–527). The release notes must say that sort order changes for existing PostgreSQL data.

Acceptance

  • Sort and range filters on text return the same result on all three providers
  • Existing content tables are altered by a migration
  • A provider test that fails before the fix

Found in the code review of 17 Nov 2026.

Vorherrschende Sprache
C#
Sterne
569
Forks
107
Ø Merge
2 Std. 49 Min.
Gemergte PRs (30 T.)
397

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus fluentcms/FluentCMS

Alle Issues in fluentcms/FluentCMS

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.