Re: generated column cast from timestamptz to timestamp not OK.

2022-05-13 Thread Francisco Olarte
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

generated column cast from timestamptz to timestamp not OK.

2022-05-13 Thread alias
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