-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
column "Message" does not exist while using postgresql as db provider #157
Comments
Could you specify the PostgreSQL sink you are using? PostgreSQL or PostgreSQLalternative? |
Same problem here. I'm using the "alternative" provider. Note that in my case the "Message" column really is missing. I don't include it as I rely on the "MessageTemplate" instead (inside the json column). I see that the column names are defined here. I don't use those. Am I still able to use this package? UPDATE I found some instructions for customisation, so I did this: public class CustomPostgresLogModel : PostgresLogModel {
[RemovedColumn] public override string? Exception { get; set; }
// cannot do this as they are sealed:
//[RemovedColumn] public override string? Message { get; set; }
//[RemovedColumn] public override DateTime Timestamp { get; set; }
} |
hello @lonix1 as a design choice, Message column is not removable as it's required for the UI current page (as you'll see from screenshots sample, it's part of the required columns). |
Yes I realised that once I started tinkering with this library, some columns are required. I think that will please many users, but not everyone as is always the case. It would be nice in the future if it were possible to customise the UI's columns, but I'm sure that would be a lot of work. Thanks for the reply. |
Describe the bug
I'm receiving an Npgsql.PostgresException with error code 42703, indicating that the column "Message" does not exist in the PostgreSQL database. This error occurs when trying to fetch logs using Serilog.Ui.PostgreSqlProvider. The error suggests that the query might be referencing "Message" instead of "message" or another case-sensitive variant.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The logs should be retrieved successfully without a case-sensitive column mismatch.
Error Message
Npgsql.PostgresException (0x80004005): 42703: column "Message" does not exist Position: 8 at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder
1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) ... Exception data: Severity: ERROR SqlState: 42703 MessageText: column "Message" does not exist Hint: Perhaps you meant to reference the column "logs.message". Position: 8 File: parse_relation.c Line: 3738 Routine: errorMissingColumn
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: