From 446f4113d9c3d0f99d043920ac49d4bc4c5f53e6 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 3 Jul 2019 16:19:46 +0200 Subject: [PATCH] Return NULL instead of NOW() The absence of foreign CDB_TableMetadata actually means that we cannot really tell when a remote table was modified. Therefore we're using NULL with the meaning of "I don't know when it was last modified". To be taken in other caching layers, to adjust headers accordingly. --- scripts-available/CDB_ForeignTable.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts-available/CDB_ForeignTable.sql b/scripts-available/CDB_ForeignTable.sql index 0dc8bdf..f60b043 100644 --- a/scripts-available/CDB_ForeignTable.sql +++ b/scripts-available/CDB_ForeignTable.sql @@ -131,8 +131,7 @@ BEGIN WHEN undefined_table THEN -- If you add a GET STACKED DIAGNOSTICS text_var = RETURNED_SQLSTATE -- you get a code 42P01 which corresponds to undefined_table - RAISE NOTICE 'CDB_Get_Foreign_Updated_At: could not find %.cdb_tablemetadata while checking % updated_at, returning NOW() timestamp', fdw_schema_name, foreign_table; - time := NOW(); + RAISE NOTICE 'CDB_Get_Foreign_Updated_At: could not find %.cdb_tablemetadata while checking % updated_at, returning NULL timestamp', fdw_schema_name, foreign_table; END; RETURN time; END