Class PgMessage.

Inherits PgServerMessage

S: This is an error or notification message sent by the server.

The message data consists of (Byte, EString) pairs, terminated by a trailing NUL. The byte identifies the type of value that follows. (For example, 'M' is followed by the error message.)

EString PgMessage::code() const

Returns (as a string) the SQLstate code associated with the message. There are listed by http://www.postgresql.org/docs/current/static/errcodes-appendix.html.

EString PgMessage::detail() const

Returns a detailed description of the message(), if available, or an empty string otherwise.

EString PgMessage::file() const

Returns the name of the source file that generated the message, if available, or an empty string otherwise.

EString PgMessage::hint() const

Returns a hint to the user about what to do next, if available, or an empty string otherwise.

EString PgMessage::line() const

Returns (as a string) the line number where the message was generated, if available, or an empty string otherwise.

EString PgMessage::message() const

Returns the contents of the message.

EString PgMessage::position() const

Returns (as a string) the position in the query of whatever problem caused this message to be generated (or an empty string if no such thing was specified by the server).

EString PgMessage::routine() const

Returns the name of the routine that generated this message, if available, or an empty string otherwise.

EString PgMessage::severity() const

Returns the severity of a message, in the language Postgres is configured to use. If Postgres uses English, this has one of the following values: Unknown, Panic, Fatal, Error, Warning, Notice, Debug, Info, Log.

Type PgMessage::type() const

Returns either "Notification" or "Error", depending on the type of the server message this object represents.

Reimplements PgServerMessage::type().

EString PgMessage::where() const

Returns a string describing where the error occurred, if available, or an empty string otherwise.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.