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

Aperta
#3,308 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, postgresql
Ambito
database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
569
Fork
107
Merge medio
2h 49m
PR unite (30g)
397

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.