Problem:
Advanced Inspector showing ERROR: function array_check...
Symptoms:
On Advanced Inspector page, under Sparklines, some of the graphs return "Database Error, Run-Main SQL= ERROR: function array_check(double precision[], numeric, numeric) does not exist..." error.
Possible Resolution(s):
SQL Function array_check is not working properly, and it needs to be recreated or replaced.
- SSH to Stratusphere Database Appliance (or Stratusphere Hub if it is a standalone setup) as root: https://liquidwarelabs.zendesk.com/entries/24782618-How-do-I-Remote-Access-Stratusphere-Appliance-Console-
- Access the PostgreSQL database interface: su - postgres -c 'psql portal'
- Paste in the following:
begin;
CREATE OR REPLACE FUNCTION array_check(double precision[],double precision,double precision)
RETURNS text AS $$
with
base as (
SELECT CASE WHEN v > $2 THEN v END as p
FROM unnest($1) g(v)
),
peak1 as (
SELECT p as p1,
CASE WHEN p > $3 THEN p ELSE null END as p2
FROM base
),
peak2 as (
SELECT avg(p1) as p1,
count(p1) as c1,
avg(p2) as p2,
count(p2) as c2
FROM peak1
)
select p1::text || '|' || c1::text || '|' || p2::text || '|' || c2::text
from peak2
$$ LANGUAGE sql; - If no error returned, run: commit;
Otherwise, run "rollback;" and perform the previous step again.
Product: Stratusphere FIT/UX
Product Version: N/A
Expires on: 365 days from publish date
Updated: December 23, 2014