Re: Virtual generated columns - Mailing list pgsql-hackers

From jian he
Subject Re: Virtual generated columns
Date
Msg-id CACJufxHxoz_KVQxcQ=cSvJc+PNbh=FaHbcMZCOisoOaGAgjy4w@mail.gmail.com
Whole thread Raw
In response to Re: Virtual generated columns  (jian he <jian.universality@gmail.com>)
Responses Re: Virtual generated columns
Re: Virtual generated columns
List pgsql-hackers
another bug?
drop table gtest12v;
CREATE TABLE gtest12v (a int PRIMARY KEY, b bigint, c int GENERATED
ALWAYS AS (b * 2) VIRTUAL);
insert into gtest12v (a,b) values (11,  22147483647);
table gtest12v;

insert ok, but select error:
ERROR:  integer out of range

should insert fail?



CREATE TABLE gtest12v (a int PRIMARY KEY, b bigint, c int GENERATED
ALWAYS AS (b * 2) VIRTUAL);
CREATE SEQUENCE sequence_testx OWNED BY gtest12v.c;

seems to work. But I am not sure if there are any corner cases that
make it not work.
just want to raise this issue.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pg_upgrade and logical replication
Next
From: Thomas Munro
Date:
Subject: Re: Windows default locale vs initdb