Skip to content

Commit c2edc24

Browse files
authored
Merge pull request #420 from DataObjects-NET/7.1-pgsql-nulls-order-in-indexes
Postgresql: Declare the same setting for nulls in indexes as in order by statement
2 parents ee66c74 + 06d0f1c commit c2edc24

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog/7.1.4_dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[main] Addressed IndexOutOfRangeException on translation of certain queries with aggregates
2-
[main] Notification to BuildLog when a hierarchy changes KeyGeneratorKind value to None
2+
[main] Notification to BuildLog when a hierarchy changes KeyGeneratorKind value to None
3+
[postgresql] Added explicit nulls setting for both column order directions to improve OrderBy/OrderByDescending performance

Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v9_0/Translator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public override void Translate(SqlCompilerContext context, object literalValue)
3030
}
3131
}
3232

33+
public override void TranslateSortOrder(IOutput output, bool ascending) =>
34+
output.Append(ascending ? "ASC NULLS FIRST" : "DESC NULLS LAST");
35+
3336
// Constructors
3437

3538
public Translator(SqlDriver driver)

0 commit comments

Comments
 (0)