lib/adapters/postgres.js
function () {
            if (!this.__serverVersion) {
                var self = this;
                this.__serverVersion = this.get(identifier("version").sqlFunction).chain(function (version) {
                    var m = version.match(/PostgreSQL (\d+)\.(\d+)(?:(?:rc\d+)|\.(\d+))?/);
                    version = (parseInt(m[1], 10) * 10000) + (parseInt(m[2], 10) * 100) + parseInt(m[3], 10);
                    self._serverVersion = version;
                    return version;
                });
            }
            return this.__serverVersion.promise();
        }
function () {
            if (!this.__serverVersion) {
                var self = this;
                this.__serverVersion = this.get(identifier("version").sqlFunction).chain(function (version) {
                    var m = version.match(/PostgreSQL (\d+)\.(\d+)(?:(?:rc\d+)|\.(\d+))?/);
                    version = (parseInt(m[1], 10) * 10000) + (parseInt(m[2], 10) * 100) + parseInt(m[3], 10);
                    self._serverVersion = version;
                    return version;
                });
            }
            return this.__serverVersion.promise();
        }
function ( ) { if ( ! this . __serverVersion ) { var self = this ; this . __serverVersion = this . get ( identifier ( "version" ) . sqlFunction ) . chain ( function ( version ) { var m = version . match ( / PostgreSQL (\d+)\.(\d+)(?:(?:rc\d+)|\.(\d+))? / ) ; version = ( parseInt ( m [ 1 ] , 10 ) * 10000 ) + ( parseInt ( m [ 2 ] , 10 ) * 100 ) + parseInt ( m [ 3 ] , 10 ) ; self . _serverVersion = version ; return version ; } ) ; } return this . __serverVersion . promise ( ) ; }
Get version of postgres server, used for determined capabilities.
Get version of postgres server used for determined capabilities .