Re: Stored columns: Unexpected varattno in expression to be mapped - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Stored columns: Unexpected varattno in expression to be mapped
Date
Msg-id 3360959.1594915835@sss.pgh.pa.us
Whole thread Raw
In response to Stored columns: Unexpected varattno in expression to be mapped  ("Thiede, Christoph" <Christoph.Thiede@student.hpi.uni-potsdam.de>)
Responses Re: Stored columns: Unexpected varattno in expression to be mapped
List pgsql-bugs
"Thiede, Christoph" <Christoph.Thiede@student.hpi.uni-potsdam.de> writes:
> as a Postgres user for about half a year, I think I found a bug in psql (PostgreSQL) 12.2 (Debian 12.2-2.pgdg100+1).

> Steps to reproduce:

> postgres=# create table mytable (foo text generated always as (bar) stored, bar text);
> CREATE TABLE
> postgres=# create temporary table mytemp1 (like mytable);
> CREATE TABLE
> postgres=# create temporary table mytemp2 (like mytable including all);
> ERROR:  unexpected varattno 2 in expression to be mapped

Thanks for the report!  Trying this locally, it seems to work in
either HEAD or v12 branch tip, so I think we fixed the bug already.
I recall some recent work around this area, so that conclusion
is not surprising.  What I don't recall is whether those fixes
were before or after 12.3.  You might find that updating to 12.3
fixes it; if not, it should be fixed in next month's 12.4 release.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Stored columns: Unexpected varattno in expression to be mapped
Next
From: Michael Paquier
Date:
Subject: Re: Stored columns: Unexpected varattno in expression to be mapped