Skip to content

Commit 663c582

Browse files
committed
Fix 9.0 version of IntervalToMilliseconds translation
Trunc operation added to correctly return values
1 parent cc1e507 commit 663c582

File tree

1 file changed

+2
-2
lines changed
  • Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v9_0

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ internal class Compiler : v8_4.Compiler
1414
protected override void VisitIntervalToMilliseconds(SqlFunctionCall node)
1515
{
1616
AppendSpaceIfNecessary();
17-
_ = context.Output.Append("(EXTRACT(EPOCH FROM (");
17+
_ = context.Output.Append("(TRUNC(EXTRACT(EPOCH FROM (");
1818
node.Arguments[0].AcceptVisitor(this);
19-
_ = context.Output.Append(")) * 1000)");
19+
_ = context.Output.Append(")) * 1000))");
2020

2121
}
2222

0 commit comments

Comments
 (0)