Skeleton for CDB_SetUp_PG_Federated_Server
This commit is contained in:
parent
b68ce72889
commit
8e005e556e
27
scripts-available/CDB_PG_Federated_Tables.sql
Normal file
27
scripts-available/CDB_PG_Federated_Tables.sql
Normal file
@ -0,0 +1,27 @@
|
||||
----------------------------------------------------------------------
|
||||
-- Federated Tables management functions
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
--
|
||||
-- Set up a federated server for later connection of tables/views
|
||||
-- E.g:
|
||||
-- SELECT cartodb.CDB_SetUp_PG_Federated_Server('amazon', '{
|
||||
-- "server": {
|
||||
-- "dbname": "testdb",
|
||||
-- "host": "myhostname.us-east-2.rds.amazonaws.com",
|
||||
-- "port": "5432"
|
||||
-- },
|
||||
-- "credentials": {
|
||||
-- "username": "read_only_user",
|
||||
-- "password": "secret"
|
||||
-- }
|
||||
-- }');
|
||||
CREATE OR REPLACE FUNCTION @extschema@.CDB_SetUp_PG_Federated_Server(server_alias text, config json)
|
||||
RETURNS void
|
||||
AS $$
|
||||
BEGIN
|
||||
-- TODO
|
||||
END
|
||||
$$
|
||||
LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
|
1
scripts-enabled/255-CDB_PG_Federated_Tables.sql
Symbolic link
1
scripts-enabled/255-CDB_PG_Federated_Tables.sql
Symbolic link
@ -0,0 +1 @@
|
||||
../scripts-available/CDB_PG_Federated_Tables.sql
|
@ -663,6 +663,9 @@ EOF
|
||||
DATABASE=fdw_target tear_down_database
|
||||
}
|
||||
|
||||
function test_federated_tables() {
|
||||
}
|
||||
|
||||
function test_cdb_catalog_basic_node() {
|
||||
DEF="'{\"type\":\"buffer\",\"source\":\"b2db66bc7ac02e135fd20bbfef0fdd81b2d15fad\",\"radio\":10000}'"
|
||||
sql postgres "INSERT INTO cartodb.cdb_analysis_catalog (node_id, analysis_def) VALUES ('1bbc4c41ea7c9d3a7dc1509727f698b7', ${DEF}::json)"
|
||||
|
Loading…
Reference in New Issue
Block a user