github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/pgwire/pgerror/errors.proto (about)

     1  // Copyright 2016 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  syntax = "proto3";
    12  package cockroach.pgerror;
    13  option go_package = "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror";
    14  
    15  // Error contains all Postgres wire protocol error fields.
    16  // See https://www.postgresql.org/docs/current/static/protocol-error-fields.html
    17  // for a list of all Postgres error fields, most of which are optional and can
    18  // be used to provide auxiliary error information.
    19  message Error {
    20    // standard pg error fields. This can be passed
    21    // over the pg wire protocol.
    22    string code = 1;
    23    string message = 2;
    24    string detail = 3;
    25    string hint = 4;
    26    string severity = 8;
    27    string constraint_name = 9;
    28  
    29    message Source {
    30        string file = 1;
    31        int32 line = 2;
    32        string function = 3;
    33    }
    34    Source source = 5;
    35  
    36    reserved 6,7;
    37  };