Skip to content

PgDiagnostic

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Describes an owned PostgreSQL message with structured diagnostics for client and server reporting.

public sealed class PgDiagnostic

Inheritance: object

Creates a message whose SQLSTATE defaults to PostgreSQL’s severity-dependent code.

public PgDiagnostic(string message)

Parameters:

message — string

The primary message, treated as literal text.

Gets the associated column name.

public string? ColumnName { get; init; }

Value: string

Gets the associated constraint name.

public string? ConstraintName { get; init; }

Value: string

Gets additional execution context.

public string? Context { get; init; }

Value: string

Gets the associated data type name.

public string? DataTypeName { get; init; }

Value: string

Gets additional detail for clients and the server log.

public string? Detail { get; init; }

Value: string

Gets detail which replaces Detail in the server log and is never sent to clients.

public string? DetailLog { get; init; }

Value: string

Gets the message domain PostgreSQL records for the report, as C’s ereport_domain and pgrx’s ereport_domain! supply, or null for PostgreSQL’s own domain.

public string? Domain { get; init; }

Value: string

The domain names the gettext catalog for message translation. PostgreSQL stores it with the error, so callers that catch the report read it back from Domain.

Gets the source file name when explicitly supplied by the extension.

public string? File { get; init; }

Value: string

Gets a suggested corrective action.

public string? Hint { get; init; }

Value: string

Gets the one-based character position in InternalQuery.

public int InternalPosition { get; init; }

Value: int

Gets the internally executed query.

public string? InternalQuery { get; init; }

Value: string

Gets the source line number.

public int Line { get; init; }

Value: int

Gets the primary message.

public string Message { get; }

Value: string

Gets the one-based character position in the client query.

public int Position { get; init; }

Value: int

Gets the source routine name.

public string? Routine { get; init; }

Value: string

Gets the associated schema name.

public string? SchemaName { get; init; }

Value: string

Gets the optional five-character uppercase ASCII SQLSTATE.

public string? SqlState { get; init; }

Value: string

Gets the associated table name.

public string? TableName { get; init; }

Value: string