You are here

function system_update_125 in Drupal 5

Same name and namespace in other branches
  1. 4 database/updates.inc \system_update_125()

File

modules/system/system.install, line 1500

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;
}