Add foreign tables to OpenAPI output
This commit is contained in:
committed by
Steve Chávez
parent
05180f6539
commit
30cf1d100a
Vendored
+3
@@ -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;
|
||||
|
||||
Vendored
+1
@@ -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;
|
||||
|
||||
Vendored
+16
@@ -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$$;
|
||||
|
||||
Reference in New Issue
Block a user