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.
This commit is contained in:
parent
b0b4a92240
commit
446f4113d9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user