From 1b815d0674a57bffce6fe0629c39df3e546747d4 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 9 Oct 2019 17:02:54 +0200 Subject: [PATCH] Improve function inline doc --- scripts-available/CDB_PG_Federated_Tables.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts-available/CDB_PG_Federated_Tables.sql b/scripts-available/CDB_PG_Federated_Tables.sql index 277aa16..5e24b99 100644 --- a/scripts-available/CDB_PG_Federated_Tables.sql +++ b/scripts-available/CDB_PG_Federated_Tables.sql @@ -117,6 +117,7 @@ $$ LANGUAGE SQL; -- "password": "secret" -- } -- }'); +-- CREATE OR REPLACE FUNCTION @extschema@.CDB_SetUp_PG_Federated_Server(server_alias text, server_config jsonb) RETURNS void AS $$ @@ -133,7 +134,13 @@ LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE; -- --- Set up a federated table +-- Set up a Federated Table +-- +-- Precondition: the federated server has to be set up via +-- CDB_SetUp_PG_Federated_Server +-- +-- Postcondition: it generates a view in the schema of the user that +-- can be used through SQL and Maps API's. -- -- E.g: -- SELECT cartodb.CDB_SetUp_PG_Federated_Table( @@ -144,6 +151,7 @@ LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE; -- 'geom', -- optional, name of the geom column, preferably in 4326 -- 'webmercator', -- optional, must be in 3857 if present -- ); +-- CREATE OR REPLACE FUNCTION @extschema@.CDB_SetUp_PG_Federated_Table( server_alias text, schema_name name,