remove table defintions, stub in tests

This commit is contained in:
John Krauss
2016-09-29 20:53:12 +00:00
parent 48221fc358
commit 3602aab804
3 changed files with 60 additions and 124 deletions

View File

@@ -206,16 +206,16 @@ $$ LANGUAGE plpgsql;
-- Create a function that always returns the first non-NULL item
CREATE OR REPLACE FUNCTION public.first_agg ( anyelement, anyelement )
CREATE OR REPLACE FUNCTION cdb_observatory.first_agg ( anyelement, anyelement )
RETURNS anyelement LANGUAGE SQL IMMUTABLE STRICT AS $$
SELECT $1;
$$;
DROP AGGREGATE IF EXISTS public.FIRST (anyelement);
DROP AGGREGATE IF EXISTS cdb_observatory.FIRST (anyelement);
-- And then wrap an aggregate around it
CREATE AGGREGATE public.FIRST (
sfunc = public.first_agg,
CREATE AGGREGATE cdb_observatory.FIRST (
sfunc = cdb_observatory.first_agg,
basetype = anyelement,
stype = anyelement
);