Skip to content

Commit

Permalink
Double quote Schema and Table names in CountAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
igece committed Jan 17, 2023
1 parent 7e71162 commit c02dd15
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Serilog.Ui.PostgreSqlProvider/PostgreDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ private async Task<int> CountLogsAsync(
DateTime? endDate = null)
{
var queryBuilder = new StringBuilder();
queryBuilder.Append("SELECT COUNT(message) FROM ");
queryBuilder.Append("SELECT COUNT(message) FROM \"");
queryBuilder.Append(_options.Schema);
queryBuilder.Append(".");
queryBuilder.Append("\".\"");
queryBuilder.Append(_options.TableName);
queryBuilder.Append("\"");

GenerateWhereClause(queryBuilder, level, searchCriteria, startDate, endDate);

Expand Down

0 comments on commit c02dd15

Please sign in to comment.