1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Summary of Changes since Protocol 2.0</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
15 TITLE="Frontend/Backend Protocol"
16 HREF="protocol.html"><LINK
18 TITLE="Error and Notice Message Fields"
19 HREF="protocol-error-fields.html"><LINK
21 TITLE="PostgreSQL Coding Conventions"
22 HREF="source.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="protocol-error-fields.html"
67 >Chapter 44. Frontend/Backend Protocol</TD
95 NAME="PROTOCOL-CHANGES"
96 >44.6. Summary of Changes since Protocol 2.0</A
99 >This section provides a quick checklist of changes, for the benefit of
100 developers trying to update existing client libraries to protocol 3.0.</P
102 >The initial startup packet uses a flexible list-of-strings format
103 instead of a fixed format. Notice that session default values for run-time
104 parameters can now be specified directly in the startup packet. (Actually,
105 you could do that before using the <TT
108 > field, but given the
112 > and the lack of any way to quote
113 whitespace in the values, it wasn't a very safe technique.)</P
115 >All messages now have a length count immediately following the message type
116 byte (except for startup packets, which have no type byte). Also note that
117 PasswordMessage now has a type byte.</P
119 >ErrorResponse and NoticeResponse ('<TT
126 messages now contain multiple fields, from which the client code may
127 assemble an error message of the desired level of verbosity. Note that
128 individual fields will typically not end with a newline, whereas the single
129 string sent in the older protocol always did.</P
131 >The ReadyForQuery ('<TT
134 >') message includes a transaction status
137 >The distinction between BinaryRow and DataRow message types is gone; the
138 single DataRow message type serves for returning data in all formats.
139 Note that the layout of DataRow has changed to make it easier to parse.
140 Also, the representation of binary values has changed: it is no longer
141 directly tied to the server's internal representation.</P
143 >There is a new <SPAN
145 >"extended query"</SPAN
146 > sub-protocol, which adds the frontend
147 message types Parse, Bind, Execute, Describe, Close, Flush, and Sync, and the
148 backend message types ParseComplete, BindComplete, PortalSuspended,
149 ParameterDescription, NoData, and CloseComplete. Existing clients do not
150 have to concern themselves with this sub-protocol, but making use of it
151 may allow improvements in performance or functionality.</P
153 >COPY data is now encapsulated into CopyData and CopyDone messages. There
154 is a well-defined way to recover from errors during COPY. The special
161 > last line is not needed anymore, and is not sent
163 (It is still recognized as a terminator during COPY IN, but its use is
164 deprecated and will eventually be removed.) Binary COPY is supported.
165 The CopyInResponse and CopyOutResponse messages include fields indicating
166 the number of columns and the format of each column.</P
168 >The layout of FunctionCall and FunctionCallResponse messages has changed.
169 FunctionCall can now support passing NULL arguments to functions. It also
170 can handle passing parameters and retrieving results in either text or
171 binary format. There is no longer any reason to consider FunctionCall a
172 potential security hole, since it does not offer direct access to internal
173 server data representations.</P
175 >The backend sends ParameterStatus ('<TT
178 >') messages during connection
179 startup for all parameters it considers interesting to the client library.
180 Subsequently, a ParameterStatus message is sent whenever the active value
181 changes for any of these parameters.</P
183 >The RowDescription ('<TT
186 >') message carries new table OID and column
187 number fields for each column of the described row. It also shows the format
188 code for each column.</P
190 >The CursorResponse ('<TT
193 >') message is no longer generated by
196 >The NotificationResponse ('<TT
199 >') message has an additional string
200 field, which is presently empty but may someday carry additional data passed
201 from the NOTIFY event sender.</P
203 >The EmptyQueryResponse ('<TT
206 >') message used to include an empty
207 string parameter; this has been removed.</P
214 SUMMARY="Footer navigation table"
225 HREF="protocol-error-fields.html"
253 >Error and Notice Message Fields</TD
267 >PostgreSQL Coding Conventions</TD