1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/17148] Fix sql_table_exists() error for PostgreSQL 9.3 and earlier

PostgreSQL 9.3 and earlier versions don't support Empty SELECT lists
(support was added since v. 9.4).
Also add PostgreSQL 9.3 tests as earlier images fail in current tests env.

PHPBB3-17148
This commit is contained in:
rxu
2023-06-17 12:36:29 +07:00
parent 75dcbeaa9f
commit 8c33a2180d
2 changed files with 4 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ class postgres extends tools
function sql_table_exists($table_name)
{
$sql = "SELECT CAST(EXISTS(
SELECT FROM information_schema.tables
SELECT * FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = '" . $this->db->sql_escape($table_name) . "'
) AS INTEGER)";