function xmlsitemap_update_2 in XML sitemap 5.2
Implementation of hook_update_N().
File
- xmlsitemap/
xmlsitemap.install, line 74 - Install file for XML sitemap
Code
function xmlsitemap_update_2() {
$ret = array();
$result = array();
if ($GLOBALS['db_type'] == 'pgsql') {
$ret[] = update_sql('CREATE OR REPLACE FUNCTION first(anyelement, anyelement) RETURNS anyelement AS \'SELECT COALESCE($1, $2);\' LANGUAGE \'sql\';');
$result = @update_sql("DROP AGGREGATE first(anyelement)");
if ($result['success']) {
$ret[] = $result;
}
$ret[] = update_sql("CREATE AGGREGATE first(\n sfunc = first,\n basetype = anyelement,\n stype = anyelement\n );");
}
return $ret;
}