On Fri, 13 May 2022 at 12:47, alias wrote:
> CREATE TABLE test_g (
> a timestamptz,
> b timestamp GENERATED ALWAYS AS (a::timestamp) STORED
> );
> then an error occurred.
>> ERROR: 42P17: generation expression is not immutable
Cast to timestamp uses current session time zone, current ses
CREATE TABLE test_g (
a timestamptz,
b timestamp GENERATED ALWAYS AS (a::timestamp) STORED
);
then an error occurred.
> ERROR: 42P17: generation expression is not immutable
> LOCATION: cookDefault, heap.c:2768
>
However the following 2 commands is ok.
CREATE TABLE test_i (
> a int