summaryrefslogtreecommitdiff
path: root/includes/database.pgsql.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/database.pgsql.inc')
-rw-r--r--includes/database.pgsql.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc
index bb7ffd1c0..e969f722a 100644
--- a/includes/database.pgsql.inc
+++ b/includes/database.pgsql.inc
@@ -344,6 +344,13 @@ function db_unlock_tables() {
}
/**
+ * Check if a table exists.
+ */
+function db_table_exists($table) {
+ return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{" . db_escape_table($table) . "}'"));
+}
+
+/**
* Verify if the database is set up correctly.
*/
function db_check_setup() {