Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -1076,12 +1076,15 @@ |
1077 | 1077 | */ |
1078 | 1078 | function getServerVersion() { |
1079 | 1079 | $versionInfo = pg_version( $this->mConn ); |
1080 | | - if ( isset( $versionInfo['server'] ) ) { |
| 1080 | + if ( version_compare( $versionInfo['client'], '7.4.0', 'lt' ) ) { |
| 1081 | + // Old client, abort install |
| 1082 | + $this->numeric_version = '7.3 or earlier'; |
| 1083 | + } elseif ( isset( $versionInfo['server'] ) ) { |
| 1084 | + // Normal client |
1081 | 1085 | $this->numeric_version = $versionInfo['server']; |
1082 | 1086 | } else { |
1083 | | - // There's no way to identify the precise version before 7.4, but |
1084 | | - // it doesn't matter anyway since we're just going to give an error. |
1085 | | - $this->numeric_version = '7.3 or earlier'; |
| 1087 | + // Bug 16937: broken pgsql extension from PHP<5.3 |
| 1088 | + $this->numeric_version = pg_parameter_status( $this->mConn, 'server_version' ); |
1086 | 1089 | } |
1087 | 1090 | return $this->numeric_version; |
1088 | 1091 | } |