| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
|---|---|
| To: | colin(at)darie(dot)eu, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #16441: Cannot multi-insert into generated column with DEFAULT value |
| Date: | 2020-05-18 14:57:26 |
| Message-ID: | 3a66b26f-0154-3216-1ed5-a63bf63ec61a@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On 2020-05-15 23:07, PG Bug reporting form wrote:
> Multiple inserts of DEFAULT value for generated columns are failing. Single
> inserts are OK.
>
>
> CREATE TABLE squares (num INTEGER NOT NULL, square INTEGER GENERATED ALWAYS
> AS (num * num) STORED);
>
>
> INSERT INTO squares(num, square) VALUES (1, DEFAULT);
> => INSERT 0 1
> INSERT INTO squares(num, square) VALUES (2, DEFAULT), (3, DEFAULT);
> => ERROR: cannot insert into column "square"
> => DETAIL: Column "square" is a generated column.
Yes, this has been reported before. This is basically just not
implemented. Is there a reason you need to use this form, or are you
just trying things out?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Arthur Cheysson | 2020-05-18 15:08:13 | Re: BUG #16283: crash on create index segmentation fault |
| Previous Message | David G. Johnston | 2020-05-18 14:22:56 | Re: BUG #16448: Remote code execution vulnerability |