I’m using Postgres 9. I’m trying to do date math with a column in my table that is an integer. I’m trying this:
select current_timestamp + interval age || ' years'
from my_table
where age is not null
limit 5;
ERROR: syntax error at or near "||" LINE 1: select current_timestamp + interval age || ' years' from rac...
What is the proper way to write this? I’m trying to add the age
column, which is in years, to the current timestamp (now)?