Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utplQ-00EcPP-Vv for pgsql-admin@arkaria.postgresql.org; Wed, 03 Sep 2025 15:51:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1utplP-00A5N4-Om for pgsql-admin@arkaria.postgresql.org; Wed, 03 Sep 2025 15:51:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1utplP-00A5Mw-DX for pgsql-admin@lists.postgresql.org; Wed, 03 Sep 2025 15:51:11 +0000 Received: from mail-vk1-xa2f.google.com ([2607:f8b0:4864:20::a2f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1utplM-000NJA-25 for pgsql-admin@lists.postgresql.org; Wed, 03 Sep 2025 15:51:11 +0000 Received: by mail-vk1-xa2f.google.com with SMTP id 71dfb90a1353d-544c598b9a4so22021e0c.1 for ; Wed, 03 Sep 2025 08:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756914668; x=1757519468; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gxSumh31Yo3LhbbM1pazWoYW0F2Gz7yDXo+UtbLK3gY=; b=YYg9KpJvI41D0tdk4RgNnvZLxREUa1idpKFklc6RBF6+/Of86GcYO6LEzQZ01A3a4I ZT5OmYCRH10MuhOxEuLD1rL6vILc5/6lKn0eHEB1dTyj9bbsTGuI/t/VnDwQiafIt6Gg WI5bwufMw3OSX9o1e9ryy0ccAdFkXpSn4T2E0/IH2scbthhGNLBvp7OMXRD/xrUF078J 8bXr2LWfXBNcon6bxfkAZExxcmDneyywQjjZlyaQugjtRiUdaDA2fdjrQtXqn6gs2tN5 NGX1nVBXetkQ8YBEX+mlNEXwXUiAKyFZPwnA2V4vsQAHUjQNZwrQID3HruxF/34Eg2cO 1GXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756914668; x=1757519468; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gxSumh31Yo3LhbbM1pazWoYW0F2Gz7yDXo+UtbLK3gY=; b=JQtS1SNxyze+i5HP8uqz35bwQT/b987o30Wu8WbUYFwOEwrf4811YB8L7jYs4XrDPh 6Wx5pAtFK+XnfvQt4BcODXhKBjs/Z9B8skhuCZwLZv1Ht6ZO1NQ7W/Iij5N/+8Gtxc9N ie8dWE/2v3BChNPSZXZ7tdx0gy17UiNREGAwBpEASPOss6uWD9XXqx9qdzUBkt0gmUZy Y4Rxh3N49zLUx0UcTqXZB91ny/E6hqOMw5IyXRHi1vzDaqy4L3ujfReFWWIkEgLEVjor 0N0vHXHFJogVIqz8BdrfwUy1GYlIDzIsrGh+cELO8ivLHu9H0S1+XKD+LewgV1Q00Ekb MEGA== X-Gm-Message-State: AOJu0YzX9FNPI+N54KK9bhL++efoOzEoKKmfAygxRi3OCbL87k0jR2ZQ ok68cGdDErWeqJcvWnOc9hJuvHPf2094yDo54e5AF4eS4MP5ylihCoIcjKwBW8/e6Am+pFYNb5b tvmWYtLarojIwRxc2L5f0u0fD1Dmki7/1rnMO X-Gm-Gg: ASbGncv+CUrXGggG6LFK3WKS7tUTf6rjCF59aPdt0xvXfJ2zpVt7Sqygc1+udwBz+yh /vQeaOhRItWT2MdVoxNL9ZKUq/FghCklHcLhf2NwH8/GbgJ+c9gKyh4GLA82ttGiReQr38pJBis RjX8bL7HPhw1uV1yQZhyBGCr9Aq7UejB6zulrA6kVq1URJo479FKB4n0u1I7pj8tmAgRmsruqqj p4t4Ztgk+lzERf4lzLx+Nz6nEQOTuKB0dkz5C6zpH85+ZPk5Pg= X-Google-Smtp-Source: AGHT+IHaEjFQ5WpsxT3JI/vZ0cAk7oAhOw28KLn1HOK8bitabX5kqZ9aEnH5vLLlRYbUUA1hgwMd3fkVdjzxLpkiT5s= X-Received: by 2002:a05:6122:919:b0:541:52d4:7447 with SMTP id 71dfb90a1353d-5449ff8d505mr4680084e0c.0.1756914667780; Wed, 03 Sep 2025 08:51:07 -0700 (PDT) MIME-Version: 1.0 From: Mauricio Fernandez Date: Wed, 3 Sep 2025 11:50:57 -0400 X-Gm-Features: Ac12FXxESXMkrWBlcklwA0C0SpmFWBSYwJH7kji-CvV8-b-2FAO8N1bGnSb4Hjk Message-ID: Subject: Adding timestamp column To: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000ac7e91063de7922c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ac7e91063de7922c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A1ndez --000000000000ac7e91063de7922c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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_t= imestamp(timecreated::double precision)) datecreated =C2=A0
from MDL_LOG= STORE_STANDARD_LOG;

But, when I want to alter = the table I get=C2=A0 a syntax=C2=A0error

alter ta= ble MDL_LOGSTORE_STANDARD_LOG
=C2=A0 add column datecreated timestamp <= br>=C2=A0 generated always as ( timezone ('America/Santiago'::text,= to_timestamp(timecreated::double precision)));

SQL Error [42601]: ERROR: syntax error at end of input
=C2=A0 Position= : 185

I would appreciate some tips

<= /div>
Thanks in advanced

kind regards

Mauricio Fern=C3=A1ndez
--000000000000ac7e91063de7922c--