Add set schema to middleware

Fix #828, breaking change: computed columns now only work if they are on
the config schema.

Fix #835, tests now not depend on the search_path of the
postgrest_test_authenticator.
This commit is contained in:
steve-chavez
2018-01-10 09:50:20 -05:00
committed by Steve Chávez
parent f9e770b583
commit 85d9feeeab
7 changed files with 24 additions and 20 deletions
+9 -16
View File
@@ -112,16 +112,19 @@ CREATE TABLE items (
);
SET search_path = public, pg_catalog;
--
-- Name: always_true(test.items); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION always_true(test.items) RETURNS boolean
LANGUAGE sql STABLE
AS $$ SELECT true $$;
CREATE FUNCTION anti_id(test.items) RETURNS bigint
LANGUAGE sql STABLE
AS $_$ SELECT $1.id * -1 $_$;
SET search_path = public, pg_catalog;
CREATE FUNCTION always_false(test.items) RETURNS boolean
LANGUAGE sql STABLE
AS $$ SELECT false $$;
create table public_consumers (
id serial not null unique,
@@ -136,16 +139,6 @@ create table public_orders (
primary key (id)
);
--
-- Name: anti_id(test.items); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION anti_id(test.items) RETURNS bigint
LANGUAGE sql STABLE
AS $_$ SELECT $1.id * -1 $_$;
SET search_path = تست, pg_catalog;
CREATE TABLE موارد (