function system_update_125 in Drupal 4
Same name and namespace in other branches
- 5 modules/system/system.install \system_update_125()
File
- database/
updates.inc, line 390
Code
function system_update_125() {
// Postgres only update.
$ret = array();
if ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql("CREATE OR REPLACE FUNCTION if(boolean, anyelement, anyelement) RETURNS anyelement AS '\n SELECT CASE WHEN \$1 THEN \$2 ELSE \$3 END;\n ' LANGUAGE 'sql'");
$ret[] = update_sql("CREATE FUNCTION greatest(integer, integer, integer) RETURNS integer AS '\n SELECT greatest(\$1, greatest(\$2, \$3));\n ' LANGUAGE 'sql'");
}
return $ret;
}