[PATCH] Correct the version sent in protocol negotiation - Mailing list pgsql-docs

From Ning Sun
Subject [PATCH] Correct the version sent in protocol negotiation
Date
Msg-id 065b1b54-dc4a-4a29-919d-76f89ce96532@gmail.com
Whole thread
Responses Re: [PATCH] Correct the version sent in protocol negotiation
List pgsql-docs
Our protocol doc describes protocol negotiation message will send latest 
minor version. However that field is a 4-byte one. The actual 
implementation sends full version including the major part:

static void
SendNegotiateProtocolVersion(List *unrecognized_protocol_options)
{
     StringInfoData buf;
     ListCell   *lc;

     pq_beginmessage(&buf, PqMsg_NegotiateProtocolVersion);
     pq_sendint32(&buf, FrontendProtocol);
     pq_sendint32(&buf, list_length(unrecognized_protocol_options));
     foreach(lc, unrecognized_protocol_options)
         pq_sendstring(&buf, lfirst(lc));
     pq_endmessage(&buf);

     /* no need to flush, some other message will follow */
}

The patch included just clarifies this behavior by removing "minor" from 
"newest minor version".


Attachment

pgsql-docs by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: pg_checksums docs mentioning online functions
Next
From: Laurenz Albe
Date:
Subject: Re: [PATCH] Correct the version sent in protocol negotiation