package
0.0.0-20240827045243-13a6da0b124d
Repository: https://github.com/forhsd/postgresql-parser.git
Documentation: pkg.go.dev
# Functions
ComputeDefaultCode looks at the current error object (not its causes) and returns: - the existing code for Error instances - SerializationFailure for roachpb retry errors that can be reported to clients - StatementCompletionUnknown for ambiguous commit errors - InternalError for assertion failures - FeatureNotSupportedError for unimplemented errors.
DangerousStatementf creates a new error for "rejected dangerous statements".
Flatten turns any error into a pgerror with fields populated.
FullError can be used when the hint and/or detail are to be tested.
GetPGCode retrieves the error code for an error.
GetPGCodeInternal retrieves a code for the error.
HasCandidateCode returns tue iff the error or one of its causes has a candidate pg error code.
IsCandidateCode returns true iff the error (not its causes) has a candidate pg error code.
IsSQLRetryableError returns true if err is retryable.
New creates an error with a code.
Newf creates an Error with a format string.
NewInternalTrackingError instantiates an error meant for use with telemetry.ReportError directly.
NewWithDepthf creates an error with a pg code and extracts the context information at the specified depth level.
Noticef generates a Notice with a format string.
WithCandidateCode decorates the error with a candidate postgres error code.
Wrap wraps an error and adds a pg error code.
Wrapf wraps an error and adds a pg error code.
WrapWithDepthf wraps an error.
WrongNumberOfPreparedStatements creates new an Error for trying to prepare a query string containing more than one statement.
# Constants
InternalErrorPrefix is prepended on internal errors.
TxnRetryMsgPrefix is the prefix inserted in an error message when flattened.
# Variables
No description provided by the author
No description provided by the author
# Structs
Error contains all Postgres wire protocol error fields.
No description provided by the author
No description provided by the author
# Interfaces
ClientVisibleAmbiguousError mirrors roachpb.ClientVisibleAmbiguousError but is defined here to avoid an import cycle.
ClientVisibleRetryError mirrors roachpb.ClientVisibleRetryError but is defined here to avoid an import cycle.