Notice

public struct Notice : CustomStringConvertible

A notice received from the Postgres server.

  • ERROR, FATAL, or PANIC (in an error), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice), or a localized translation of one of these.

    Declaration

    Swift

    public var localizedSeverity: String? { get }
  • ERROR, FATAL, or PANIC (in an error), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice). Identical to localizedSeverity except that the contents are never localized.

    Declaration

    Swift

    public var severity: String? { get }
  • The SQLSTATE code for the error. Not localizable.

    Declaration

    Swift

    public var code: String? { get }
  • The primary human-readable error message. Accurate but terse (typically one line).

    Declaration

    Swift

    public var message: String? { get }
  • A secondary error message carrying more detail about the problem. Might run to multiple lines.

    Declaration

    Swift

    public var detail: String? { get }
  • A suggestion of what to do about the problem. This is intended to differ from detail in that it offers advice (potentially inappropriate) rather than hard facts. Might run to multiple lines.

    Declaration

    Swift

    public var hint: String? { get }
  • An index into the original query string. The first character has index 1, and positions are measured in characters not bytes.

    Declaration

    Swift

    public var position: String? { get }
  • An index into an internally generated command (internalQuery) rather than the one submitted by the client. The first character has index 1, and positions are measured in characters not bytes.

    Declaration

    Swift

    public var internalPosition: String? { get }
  • The text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function.

    Declaration

    Swift

    public var internalQuery: String? { get }
  • The context in which the error occurred. Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.

    Declaration

    Swift

    public var context: String? { get }
  • If the error was associated with a specific database object, the name of the schema containing that object, if any.

    Declaration

    Swift

    public var schema: String? { get }
  • If the error was associated with a specific table, the name of the table. (Refer to schema for the name of the table’s schema.)

    Declaration

    Swift

    public var table: String? { get }
  • If the error was associated with a specific table column, the name of the column. (Refer to schema and table to identify the table.)

    Declaration

    Swift

    public var column: String? { get }
  • If the error was associated with a specific data type, the name of the data type. (Refer to schema for the name of the data type’s schema.)

    Declaration

    Swift

    public var dataType: String? { get }
  • If the error was associated with a specific constraint, the name of the constraint. Refer to the above properties for the associated table or domain. (For this purpose, indexes are treated as constraints, even if they weren’t created with constraint syntax.)

    Declaration

    Swift

    public var constraint: String? { get }
  • The file name of the source-code location where the error was reported.

    Declaration

    Swift

    public var file: String? { get }
  • The line number of the source-code location where the error was reported.

    Declaration

    Swift

    public var line: String? { get }
  • The name of the source-code routine reporting the error.

    Declaration

    Swift

    public var routine: String? { get }
  • A string representation of this Notice.

    Declaration

    Swift

    public var description: String { get }