Re: Adding timestamp column

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Adding timestamp column
Дата
Msg-id CAKFQuwYQBr7Fw4S9y_nWNS7A6WnyDXf5HZ+Zq85_3nW4kUxKLg@mail.gmail.com
обсуждение исходный текст
Ответ на Adding timestamp column  (Mauricio Fernandez <mmauricio.fernandez@gmail.com>)
Список pgsql-admin
On Wednesday, September 3, 2025, Mauricio Fernandez <mmauricio.fernandez@gmail.com> wrote:

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


Unless you are experimenting with v18 the docs clearly indicate the keyword “stored” is mandatory (since the implemented in 18 virtual is the default).

David J.
 

В списке pgsql-admin по дате отправления: