Npgsql.NpgsqlConnector.ProcessServerVersion C# (CSharp) Method

ProcessServerVersion() private method

This method is required to set all the version dependent features flags. SupportsPrepare means the server can use prepared query plans (7.3+)
private ProcessServerVersion ( ) : void
return void
        private void ProcessServerVersion()
        {
            this._supportsPrepare = (ServerVersion >= new Version(7, 3, 0));
            this._supportsSavepoint = (ServerVersion >= new Version(8, 0, 0));
            this._supportsDiscard = (ServerVersion >= new Version(8, 3, 0));
            this._supportsApplicationName = (ServerVersion >= new Version(9, 0, 0));
            this._supportsExtraFloatDigits3 =(ServerVersion >= new Version(9, 0, 0));
            this._supportsExtraFloatDigits = (ServerVersion >= new Version(7, 4, 0)); 
            this._supportsSslRenegotiationLimit = ((ServerVersion >= new Version(8, 4, 3)) ||
                     (ServerVersion >= new Version(8, 3, 10) && ServerVersion < new Version(8, 4, 0)) ||
                     (ServerVersion >= new Version(8, 2, 16) && ServerVersion < new Version(8, 3, 0)) ||
                     (ServerVersion >= new Version(8, 1, 20) && ServerVersion < new Version(8, 2, 0)) ||
                     (ServerVersion >= new Version(8, 0, 24) && ServerVersion < new Version(8, 1, 0)) ||
                     (ServerVersion >= new Version(7, 4, 28) && ServerVersion < new Version(8, 0, 0)) );

            // Per the PG documentation, E string literal prefix support appeared in PG version 8.1.
            // Note that it is possible that support for this prefix will vanish in some future version
            // of Postgres, in which case this test will need to be revised.
            // At that time it may also be necessary to set UseConformantStrings = true here.
            NativeToBackendTypeConverterOptions.Supports_E_StringPrefix = (ServerVersion >= new Version(8, 1, 0));

            // Per the PG documentation, hex string encoding format support appeared in PG version 9.0.
            NativeToBackendTypeConverterOptions.SupportsHexByteFormat = (ServerVersion >= new Version(9, 0, 0));
        }