Commits

Andrew Dunstan committed 2a5552c

Fix stuff for tests in binary upgrade mode.

Comments (0)

Files changed (3)

 
 DATA         = sql/json_noextn.sql
-TESTS        = $(wildcard test/sql/*.sql)
+TESTS        = test/sql/base_noext.sql test/sql/json91.sql
 REGRESS      = $(patsubst test/sql/%.sql,%,$(TESTS))
 REGRESS_OPTS = --inputdir=test --load-language=plpgsql
 MODULES = $(patsubst %.c,%,$(wildcard src/*.c))

test/expected/base_noext.out

+\i sql/json_noextn.sql
+CREATE SCHEMA binoid;
+CREATE FUNCTION binoid.set_next_pg_type_oid(OID)
+   RETURNS VOID
+   AS '$libdir/json_binup'
+   LANGUAGE C STRICT;
+CREATE FUNCTION binoid.set_next_array_pg_type_oid(OID)
+   RETURNS VOID
+   AS '$libdir/json_binup'
+   LANGUAGE C STRICT;
+SELECT binoid.set_next_pg_type_oid(114);
+ set_next_pg_type_oid 
+----------------------
+ 
+(1 row)
+
+SELECT binoid.set_next_array_pg_type_oid(199);
+ set_next_array_pg_type_oid 
+----------------------------
+ 
+(1 row)
+
+SET search_path = 'pg_catalog';
+CREATE TYPE json;
+CREATE FUNCTION json_in(cstring)
+RETURNS json
+AS '$libdir/json'
+LANGUAGE C STRICT IMMUTABLE;
+psql:sql/json_noextn.sql:24: NOTICE:  return type json is only a shell
+CREATE FUNCTION json_out(json)
+RETURNS cstring
+AS '$libdir/json'
+LANGUAGE C STRICT IMMUTABLE;
+psql:sql/json_noextn.sql:29: NOTICE:  argument type json is only a shell
+CREATE FUNCTION json_recv(internal)
+RETURNS json
+AS '$libdir/json'
+LANGUAGE C STRICT IMMUTABLE;
+psql:sql/json_noextn.sql:34: NOTICE:  return type json is only a shell
+CREATE FUNCTION json_send(json)
+RETURNS bytea
+AS '$libdir/json'
+LANGUAGE C STRICT IMMUTABLE;
+psql:sql/json_noextn.sql:39: NOTICE:  argument type json is only a shell
+CREATE TYPE json (
+        INTERNALLENGTH = -1,
+        INPUT = json_in,
+        OUTPUT = json_out,
+        RECEIVE = json_recv,
+        SEND = json_send,
+        STORAGE = extended
+);
+CREATE FUNCTION array_to_json(anyarray)
+RETURNS json
+AS '$libdir/json','array_to_json'
+LANGUAGE C STRICT IMMUTABLE;
+CREATE FUNCTION array_to_json(anyarray, bool)
+RETURNS json
+AS '$libdir/json','array_to_json_pretty'
+LANGUAGE C STRICT IMMUTABLE;
+CREATE FUNCTION row_to_json(record)
+RETURNS json
+AS '$libdir/json','row_to_json'
+LANGUAGE C STRICT IMMUTABLE;
+CREATE FUNCTION row_to_json(record, bool)
+RETURNS json
+AS '$libdir/json','row_to_json_pretty'
+LANGUAGE C STRICT IMMUTABLE;
+DROP SCHEMA binoid CASCADE;
+psql:sql/json_noextn.sql:70: NOTICE:  drop cascades to 2 other objects
+DETAIL:  drop cascades to function binoid.set_next_pg_type_oid(oid)
+drop cascades to function binoid.set_next_array_pg_type_oid(oid)

test/sql/base_noext.sql

+\i sql/json_noextn.sql
+