Hi admins, greetings.
I'm trying to add a timestamp column in an existent table.
This query works fine:
select timecreated, timezone('America/Santiago'::text, to_timestamp(timecreated::double precision)) datecreated
from MDL_LOGSTORE_STANDARD_LOG;
But, when I want to alter the table I get a syntax error
alter table MDL_LOGSTORE_STANDARD_LOG
add column datecreated timestamp
generated always as ( timezone ('America/Santiago'::text, to_timestamp(timecreated::double precision)));
SQL Error [42601]: ERROR: syntax error at end of input
Position: 185
I would appreciate some tips
Thanks in advanced
kind regards
Mauricio Fernández