1 // Npgsql.NpgsqlMessageTypes.cs
4 // Dave Joyner <d4ljoyn@yahoo.com>
6 // Copyright (C) 2002 The Npgsql Development Team
7 // npgsql-general@gborg.postgresql.org
8 // http://gborg.postgresql.org/project/npgsql/projdisplay.php
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 /// Class NpgsqlMessageTypes_Ver_2.
32 /// Defines PG frontend/backend protocol message types and parameters used in protocol version 2.
34 internal sealed class NpgsqlMessageTypes_Ver_2
36 private NpgsqlMessageTypes_Ver_2()
39 public const Char StartupPacket
= ' ';
40 public const Char Terminate
= 'X';
42 public const Char AsciiRow
= 'D';
43 public const Char BinaryRow
= 'B';
45 public const Char AuthenticationRequest
= 'R';
46 // specific Authentication request types
47 public const Int32 AuthenticationOk
= 0;
48 public const Int32 AuthenticationKerberosV4
= 1;
49 public const Int32 AuthenticationKerberosV5
= 2;
50 public const Int32 AuthenticationClearTextPassword
= 3;
51 public const Int32 AuthenticationCryptPassword
= 4;
52 public const Int32 AuthenticationMD5Password
= 5;
53 public const Int32 AuthenticationSCMCredential
= 6;
55 public const Char BackendKeyData
= 'K';
56 public const Char CancelRequest
= 'F';
57 public const Char CompletedResponse
= 'C';
58 public const Char CopyDataRows
= ' ';
59 public const Char CopyInResponse
= 'G';
60 public const Char CopyOutResponse
= 'H';
61 public const Char CursorResponse
= 'P';
62 public const Char EmptyQueryResponse
= 'I';
63 public const Char ErrorResponse
= 'E';
64 public const Char FunctionCall
= 'F';
66 public const Char FunctionResultResponse
= 'V';
67 // specific function result responses
68 public const Char FunctionResultNonEmptyResponse
= 'G';
69 public const Char FunctionResultVoidResponse
= '0';
71 public const Char NoticeResponse
= 'N';
72 public const Char NotificationResponse
= 'A';
73 public const Char PasswordPacket
= ' ';
74 public const Char Query
= 'Q';
75 public const Char ReadyForQuery
= 'Z';
76 public const Char RowDescription
= 'T';
77 public const Char SSLRequest
= ' ';
82 /// Class NpgsqlMessageTypes_Ver_3.
83 /// Defines PG frontend/backend protocol message types and parameters used in protocol version 3.
85 internal sealed class NpgsqlMessageTypes_Ver_3
87 private NpgsqlMessageTypes_Ver_3()
90 public const Char StartupPacket
= ' ';
91 public const Char Termination
= 'X';
93 public const Char DataRow
= 'D';
95 public const Char AuthenticationRequest
= 'R';
96 // specific Authentication request types
97 public const Int32 AuthenticationOk
= 0;
98 public const Int32 AuthenticationKerberosV4
= 1;
99 public const Int32 AuthenticationKerberosV5
= 2;
100 public const Int32 AuthenticationClearTextPassword
= 3;
101 public const Int32 AuthenticationCryptPassword
= 4;
102 public const Int32 AuthenticationMD5Password
= 5;
103 public const Int32 AuthenticationSCMCredential
= 6;
105 public const Char BackendKeyData
= 'K';
106 public const Char CancelRequest
= 'F';
107 public const Char CompletedResponse
= 'C';
108 public const Char CopyDataRows
= ' ';
109 public const Char CopyInResponse
= 'G';
110 public const Char CopyOutResponse
= 'H';
111 public const Char EmptyQueryResponse
= 'I';
112 public const Char ErrorResponse
= 'E';
113 public const Char FunctionCall
= 'F';
114 public const Char FunctionCallResponse
= 'V';
116 public const Char NoticeResponse
= 'N';
117 public const Char NotificationResponse
= 'A';
118 public const Char ParameterStatus
= 'S';
119 public const Char PasswordPacket
= ' ';
120 public const Char Query
= 'Q';
121 public const Char ReadyForQuery
= 'Z';
122 public const Char RowDescription
= 'T';
123 public const Char SSLRequest
= ' ';
125 // extended query frontend messages
126 public const Char Parse
= 'P';
127 public const Char Bind
= 'B';
128 public const Char Execute
= 'E';
129 public const Char Describe
= 'D';
130 public const Char Close
= 'C';
131 public const Char Flush
= 'H';
132 public const Char Sync
= 'S';
134 // extended query backend messages
135 public const Char ParseComplete
= '1';
136 public const Char BindComplete
= '2';
137 public const Char PortalSuspended
= 's';
138 public const Char ParameterDescription
= 't';
139 public const Char NoData
= 'n';
140 public const Char CloseComplete
= '3';