I recently changed my sql query to something a little more different, yet still very simple, and now the page wont load with the error

Fatal error: Uncaught Error: Call to undefined function koolreport\datasources\pg_connect() 

thrown in koolreport\core\src\datasources\PostgreSQLDataSource.php on line 102. What would most likely be causing this? I've tried it with a lot of different queries and none seem to work. Edit: Going back to the original query that worked also throws the error., and I've also reset my server several times.