diff --git a/lib/modules/Sql.pmod/pgsql.pike b/lib/modules/Sql.pmod/pgsql.pike
index 4f983a18af483e6e49e8a4c2ad7dea02e4d7261a..8941eecc63787288089668cdc89bb1bc4d6086bb 100644
--- a/lib/modules/Sql.pmod/pgsql.pike
+++ b/lib/modules/Sql.pmod/pgsql.pike
@@ -501,7 +501,7 @@ protected void destroy() {
   resync();
 }
 
-private .pgsql_util.Result textquery(string q) {
+private .pgsql_util.sql_result textquery(string q) {
   return big_query(q, (["_text":1]));
 }
 
@@ -514,7 +514,7 @@ private void reset_dbsession() {
   mixed err = catch {
     proxy.statementsinflight->wait_till_drained();
     error(1);
-    .pgsql_util.Result res
+    .pgsql_util.sql_result res
      = textquery("ROLLBACK;RESET ALL;CLOSE ALL;DISCARD TEMP");
     while (res->fetch_row());
   };