Add foreign tables to OpenAPI output

This commit is contained in:
steve-chavez
2018-05-07 10:14:26 -05:00
committed by Steve Chávez
parent 05180f6539
commit 30cf1d100a
7 changed files with 69 additions and 6 deletions
+3
View File
@@ -408,3 +408,6 @@ INSERT INTO zone VALUES (1, 'zone 1', 2, 1);
INSERT INTO zone VALUES (2, 'zone 2', 2, 1);
INSERT INTO zone VALUES (3, 'store 3', 3, 1);
INSERT INTO zone VALUES (4, 'store 4', 3, 1);
-- for foreign table projects_dump
copy (select id, name, client_id from projects) to '/tmp/projects_dump.csv' with csv;
+1
View File
@@ -78,6 +78,7 @@ GRANT ALL ON TABLE
, person_detail
, space
, zone
, projects_dump
TO postgrest_test_anonymous;
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
+16
View File
@@ -1435,3 +1435,19 @@ create table zone(
name text,
zone_type_id integer,
space_id integer references space(id));
-- foreign table tests
create extension file_fdw;
create server import_csv foreign data wrapper file_fdw;
create foreign table projects_dump (
id integer,
name text,
client_id integer
) server import_csv options ( filename '/tmp/projects_dump.csv', format 'csv');
comment on foreign table projects_dump is
$$A temporary projects dump
Just a test for foreign tables$$;