Adding timestamp column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux