Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*-------------------------------------------------------------------------
 *
 * protocol.h
 *      Definitions of the request/response codes for the wire protocol.
 *
 *
 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * src/include/libpq/protocol.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef PROTOCOL_H
#define PROTOCOL_H
 
/* These are the request codes sent by the frontend. */
 
#define PqMsg_Bind                  'B'
#define PqMsg_Close                 'C'
#define PqMsg_Describe              'D'
#define PqMsg_Execute               'E'
#define PqMsg_FunctionCall          'F'
#define PqMsg_Flush                 'H'
#define PqMsg_Parse                 'P'
#define PqMsg_Query                 'Q'
#define PqMsg_Sync                  'S'
#define PqMsg_Terminate             'X'
#define PqMsg_CopyFail              'f'
#define PqMsg_GSSResponse           'p'
#define PqMsg_PasswordMessage       'p'
#define PqMsg_SASLInitialResponse   'p'
#define PqMsg_SASLResponse          'p'
 
 
/* These are the response codes sent by the backend. */
 
#define PqMsg_ParseComplete         '1'
#define PqMsg_BindComplete          '2'
#define PqMsg_CloseComplete         '3'
#define PqMsg_NotificationResponse  'A'
#define PqMsg_CommandComplete       'C'
#define PqMsg_DataRow               'D'
#define PqMsg_ErrorResponse         'E'
#define PqMsg_CopyInResponse        'G'
#define PqMsg_CopyOutResponse       'H'
#define PqMsg_EmptyQueryResponse    'I'
#define PqMsg_BackendKeyData        'K'
#define PqMsg_NoticeResponse        'N'
#define PqMsg_AuthenticationRequest 'R'
#define PqMsg_ParameterStatus       'S'
#define PqMsg_RowDescription        'T'
#define PqMsg_FunctionCallResponse  'V'
#define PqMsg_CopyBothResponse      'W'
#define PqMsg_ReadyForQuery         'Z'
#define PqMsg_NoData                'n'
#define PqMsg_PortalSuspended       's'
#define PqMsg_ParameterDescription  't'
#define PqMsg_NegotiateProtocolVersion 'v'
 
 
/* These are the codes sent by both the frontend and backend. */
 
#define PqMsg_CopyDone              'c'
#define PqMsg_CopyData              'd'
 
 
/* These are the codes sent by parallel workers to leader processes. */
 
#define PqMsg_Progress              'P'
 
/* Additional codes sent by repack workers to their steering process */
 
#define PqRepackMsg_Terminate       'X'
 
/* Replication codes sent by the primary (wrapped in CopyData messages). */
 
#define PqReplMsg_Keepalive         'k'
#define PqReplMsg_PrimaryStatusUpdate 's'
#define PqReplMsg_WALData           'w'
 
 
/* Replication codes sent by the standby (wrapped in CopyData messages). */
 
#define PqReplMsg_HotStandbyFeedback 'h'
#define PqReplMsg_PrimaryStatusRequest 'p'
#define PqReplMsg_StandbyStatusUpdate 'r'
 
 
/* Codes used for backups via COPY OUT (wrapped in CopyData messages). */
 
#define PqBackupMsg_Manifest        'm'
#define PqBackupMsg_NewArchive      'n'
#define PqBackupMsg_ProgressReport  'p'
 
 
/* These are the authentication request codes sent by the backend. */
 
#define AUTH_REQ_OK         0   /* User is authenticated  */
#define AUTH_REQ_KRB4       1   /* Kerberos V4. Not supported any more. */
#define AUTH_REQ_KRB5       2   /* Kerberos V5. Not supported any more. */
#define AUTH_REQ_PASSWORD   3   /* Password */
#define AUTH_REQ_CRYPT      4   /* crypt password. Not supported any more. */
#define AUTH_REQ_MD5        5   /* md5 password */
/* 6 is available.  It was used for SCM creds, not supported any more. */
#define AUTH_REQ_GSS        7   /* GSSAPI without wrap() */
#define AUTH_REQ_GSS_CONT   8   /* Continue GSS exchanges */
#define AUTH_REQ_SSPI       9   /* SSPI negotiate without wrap() */
#define AUTH_REQ_SASL      10   /* Begin SASL authentication */
#define AUTH_REQ_SASL_CONT 11   /* Continue SASL authentication */
#define AUTH_REQ_SASL_FIN  12   /* Final SASL message */
#define AUTH_REQ_MAX       AUTH_REQ_SASL_FIN    /* maximum AUTH_REQ_* value */
 
#endif                          /* PROTOCOL_H */