В Postgres вы можете использовать вариант подхода " для всех таблиц ":
select table_schema, table_name,
(xpath( '/row/max/text()',
query_to_xml(format('select max(%I) from %I.%I', column_name, table_schema, table_name), true, true, '')
)
)[1]::text::int as max_value
from information_schema.columns
where table_schema = 'public' --<< adjust for your schema name(s)
and column_name = 'date_column' --<< adjust for the real name of your column