Commits

Andrew Dunstan committed c91c10a

bin up

Comments (0)

Files changed (3)

 TESTS        = $(wildcard test/sql/*.sql)
 REGRESS      = $(patsubst test/sql/%.sql,%,$(TESTS))
 REGRESS_OPTS = --inputdir=test --load-language=plpgsql
-MODULES      = $(patsubst %.c,%,$(wildcard src/*.c))
+#MODULES      = $(patsubst %.c,%,$(wildcard src/*.c))
+MODULES = $(patsubst %.c,%,$(wildcard src/*.c))
+# OBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
 PG_CONFIG    = pg_config
 PG91         = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes)
 
  *
  */ 
 
+
+DO 
+$$
+  BEGIN
+      PERFORM 1 FROM pg_namespace WHERE nspname = 'binoid';
+      IF NOT found THEN RETURN; END IF;
+      PERFORM binoid.set_next_pg_type_oid(114);
+      PERFORM binoid.set_next_array_pg_type_oid(199);
+  END;
+$$ language PLPGSQL;
+
 CREATE TYPE json;
 
 CREATE FUNCTION json_in(cstring)
 RETURNS json
 AS 'MODULE_PATHNAME','row_to_json_pretty'
 LANGUAGE C STRICT IMMUTABLE;
+
+DO $$
+  BEGIN
+      PERFORM 1 FROM pg_namespace WHERE nspname = 'binoid';
+      IF NOT found THEN RETURN; END IF;
+      DROP SCHEMA binoid CASCADE;
+      ALTER TYPE json SET SCHEMA pg_catalog;
+  END;
+$$ language PLPGSQL;
+

test/sql/base.sql

+\! pwd
+\i sql/json_install.sql
 \set ECHO 0
 BEGIN;
 create extension json;