Skip to content
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

Open
amirelkassar opened this issue Nov 10, 2024 · 0 comments
Open

Comments

@amirelkassar
Copy link

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:

  1. Set up Serilog with Serilog.Ui.PostgreSqlProvider in a PostgreSQL database where logs are stored.
  2. Click on '....'
  3. Observe the error message about the missing "Message" column.

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.PoolingAsyncValueTaskMethodBuilder1.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

Desktop (please complete the following information):

  • OS: [e.g., Windows 11]
  • Browser [e.g., Chrome]
  • Version [e.g., 92]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant