forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit516b875
committed
Do not hardcode PG_PROTOCOL_LATEST in NegotiateProtocolVersion
We shouldn't ask the client to use a protocol version later than theone that they requested. To avoid that, if the client requests aversion newer than the latest one we support, set FrontendProtocolto the latest version we support, not the requested version. Then,use that value when building the NegotiateProtocolVersion message.(It seems good on general principle to avoid setting FrontendProtocolto a version we don't support, anyway.)None of this really matters right now, because we only support asingle protocol version, but if that ever changes, we'll need this.Jelte Fennema-Nio, reviewed by me and incorporating some of myproposed wordingDiscussion:https://postgr.es/m/CAGECzQTyXDNtMXdq2L-Wp=OvOCPa07r6+U_MGb==h90MrfT+fQ@mail.gmail.com1 parent8dc28d7 commit516b875
1 file changed
+13
-6
lines changedLines changed: 13 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
690 | 690 |
| |
691 | 691 |
| |
692 | 692 |
| |
693 |
| - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
694 | 698 |
| |
695 |
| - | |
| 699 | + | |
696 | 700 |
| |
697 | 701 |
| |
698 | 702 |
| |
| |||
852 | 856 |
| |
853 | 857 |
| |
854 | 858 |
| |
855 |
| - | |
856 |
| - | |
857 |
| - | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
858 | 865 |
| |
859 | 866 |
| |
860 | 867 |
| |
| |||
870 | 877 |
| |
871 | 878 |
| |
872 | 879 |
| |
873 |
| - | |
| 880 | + | |
874 | 881 |
| |
875 | 882 |
| |
876 | 883 |
| |
|
0 commit comments
Comments
(0)