From a8cf926566c32097c61c14210990f2a7229ddfc7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 2 Jul 2012 11:10:02 +0200 Subject: [ticket/10942] Require same data type and do not cast expressions automatically PHPBB3-10942 --- phpBB/includes/db/postgres.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'phpBB/includes/db/postgres.php') diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index c3116601ae..a31181b4d4 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -154,19 +154,6 @@ class dbal_postgres extends dbal return ($raw) ? $this->sql_server_version : 'PostgreSQL ' . $this->sql_server_version; } - /** - * {@inheritDoc} - */ - function sql_case($condition, $action_true, $action_false = false) - { - // To ensure, that both expressions have the same type, we cast them to text manually - $sql_case = 'CASE WHEN ' . $condition; - $sql_case .= ' THEN CAST(' . $action_true . ' AS TEXT)'; - $sql_case .= ($action_false !== false) ? ' ELSE CAST(' . $action_false . ' AS TEXT)' : ''; - $sql_case .= ' END'; - return $sql_case; - } - /** * {@inheritDoc} */ -- cgit v1.2.1