From 0c43fe27311443df91d804c0ad2531f4f6ca7607 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Mon, 8 Feb 2016 12:09:29 +0100 Subject: [PATCH] Define API of CDB_QueryTablesUpdatedAt --- scripts-available/CDB_QueryTables.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts-available/CDB_QueryTables.sql b/scripts-available/CDB_QueryTables.sql index c7cfa64..aaa3f8c 100644 --- a/scripts-available/CDB_QueryTables.sql +++ b/scripts-available/CDB_QueryTables.sql @@ -76,3 +76,15 @@ BEGIN RETURN CDB_QueryTablesText(query)::name[]; END $$ LANGUAGE 'plpgsql' VOLATILE STRICT; + + +-- Return a set of {db_name, schema_name, table_name. updated_at} +CREATE OR REPLACE FUNCTION CDB_QueryTablesUpdatedAt(query text) +RETURNS TABLE(db_name text, schema_name text, table_name text, updated_at timestamp) +AS $$ +BEGIN + -- TODO: Get the tables involved in the query + -- TODO: Get the local/remote db_names involved in the query + -- TODO: Get the updated_at +END +$$ LANGUAGE 'plpgsql' VOLATILE STRICT;