CDB_FederatedServerListRemote: Improve comments
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Private functions
|
-- Private functions
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- List the schemas of a remote PG server
|
||||||
|
--
|
||||||
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_List_Foreign_Schemas_PG(server_internal name)
|
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_List_Foreign_Schemas_PG(server_internal name)
|
||||||
RETURNS TABLE(remote_schema name)
|
RETURNS TABLE(remote_schema name)
|
||||||
AS $$
|
AS $$
|
||||||
@@ -20,7 +24,7 @@ DECLARE
|
|||||||
local_schema name := @extschema@.__CDB_FS_Create_Schema(server_internal, inf_schema);
|
local_schema name := @extschema@.__CDB_FS_Create_Schema(server_internal, inf_schema);
|
||||||
role_name text := @extschema@.__CDB_FS_Generate_Server_Role_Name(server_internal);
|
role_name text := @extschema@.__CDB_FS_Generate_Server_Role_Name(server_internal);
|
||||||
BEGIN
|
BEGIN
|
||||||
-- Import the foreign schemata if not done
|
-- Import the foreign schemata table
|
||||||
IF NOT EXISTS (
|
IF NOT EXISTS (
|
||||||
SELECT * FROM pg_class
|
SELECT * FROM pg_class
|
||||||
WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = local_schema)
|
WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = local_schema)
|
||||||
@@ -39,7 +43,9 @@ END
|
|||||||
$$
|
$$
|
||||||
LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
|
LANGUAGE PLPGSQL VOLATILE PARALLEL UNSAFE;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- List the tables from a remote PG schema
|
||||||
|
--
|
||||||
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_List_Foreign_Tables_PG(server_internal name, remote_schema name)
|
CREATE OR REPLACE FUNCTION @extschema@.__CDB_FS_List_Foreign_Tables_PG(server_internal name, remote_schema name)
|
||||||
RETURNS TABLE(remote_table name)
|
RETURNS TABLE(remote_table name)
|
||||||
AS $func$
|
AS $func$
|
||||||
|
|||||||
Reference in New Issue
Block a user