aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_pgsql.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/dblayer/functions_pgsql.inc.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php
index df1ce2649..5e05fb16a 100644
--- a/include/dblayer/functions_pgsql.inc.php
+++ b/include/dblayer/functions_pgsql.inc.php
@@ -60,6 +60,21 @@ function pwg_db_connect($host, $user, $password, $database)
}
}
+function pwg_db_check_version()
+{
+ $current_version = pwg_get_db_version();
+ if (version_compare($current_version, REQUIRED_PGSQL_VERSION, '<'))
+ {
+ fatal_error(
+ sprintf(
+ 'your database version is too old, you have "%s" and you need at least "%s"',
+ $current_version,
+ REQUIRED_PGSQL_VERSION
+ )
+ );
+ }
+}
+
function pwg_db_check_charset()
{
return true;