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

From David G. Johnston
Subject Re: Stored columns: Unexpected varattno in expression to be mapped
Date
Msg-id CAKFQuwb328btLTYcrG8ukHwOJ8RSZ=xkSj4Y=t55YeCg3vpy5Q@mail.gmail.com
Whole thread Raw
In response to Stored columns: Unexpected varattno in expression to be mapped  ("Thiede, Christoph" <Christoph.Thiede@student.hpi.uni-potsdam.de>)
List pgsql-bugs
On Thu, Jul 16, 2020 at 8:59 AM Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:

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:

Type the following commands into a PSQL shell:

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

I would be happy if this bug could be fixed in a later release (provided that it has not already been).

We have release notes that describe what gets fixed in each minor release (for you there is only one relevant one right now).  The notes for 12.3 seem promising but you could just install it and confirm it yourself.

https://www.postgresql.org/docs/12/release-12-3.html

David J.

pgsql-bugs by date:

Previous
From: "Thiede, Christoph"
Date:
Subject: Stored columns: Unexpected varattno in expression to be mapped
Next
From: Tom Lane
Date:
Subject: Re: Stored columns: Unexpected varattno in expression to be mapped