-- a hack so things don't totally break

create function to_char(datetime, char) returns varchar as '
DECLARE
	the_date alias for $1;
BEGIN
	return date_part(''year'', the_date) || ''-'' || date_part(''month'', the_date) || ''-'' || date_part(''day'', the_date);
END;
' language 'plpgsql';

create function to_char(timespan) returns varchar as '
DECLARE
	the_span alias for $1;
BEGIN
	return date_part(''epoch'',the_span);
END;
' language 'plpgsql';

create function pow(numeric, numeric)
returns numeric
as '
DECLARE
BEGIN
	return power( $1 , $2);
END;
' language 'plpgsql';
