+
+ /**
+ * Execute the SQL command on the open database.
+ *
+ * @param string $sSQL SQL command to execute.
+ *
+ * @return null
+ *
+ * @pre connect() must have been called.
+ */
+ private function pgExec($sSQL)
+ {
+ if (!pg_query($this->oDB->connection, $sSQL)) {
+ fail(pg_last_error($this->oDB->connection));
+ }
+ }
+
+ /**
+ * Check if the database is in reverse-only mode.
+ *
+ * @return True if there is no search_name table and infrastructure.
+ */
+ private function dbReverseOnly()
+ {
+ $sSQL = "SELECT count(*) FROM pg_tables WHERE tablename = 'search_name'";
+ return !(chksql($this->oDB->getOne($sSQL)));
+ }