Re: Brokenness in dump/restore for GENERATED expressions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Brokenness in dump/restore for GENERATED expressions
Date: 2020-02-03 13:19:11
Message-ID: b12824c5-c441-a4f9-4dc4-389c58dc0db0@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-01-30 19:54, Tom Lane wrote:
> Using today's HEAD, the regression database cannot be dumped and
> restored normally. Since the buildfarm isn't all red, I suppose
> it works in --binary-upgrade mode ... but if I just do
>
> $ make installcheck # to set up the test database
> $ pg_dump -Fc regression >r.dump
> $ createdb r2
> $ pg_restore -d r2 r.dump
>
> I get
>
> pg_restore: while PROCESSING TOC:
> pg_restore: from TOC entry 6016; 2604 24926 DEFAULT gtest1_1 b postgres
> pg_restore: error: could not execute query: ERROR: column "b" of relation "gtest1_1" is a generated column
> Command was: ALTER TABLE ONLY public.gtest1_1 ALTER COLUMN b SET DEFAULT (a * 2);
>
>
> pg_restore: from TOC entry 6041; 2604 25966 DEFAULT gtest30_1 b postgres
> pg_restore: error: could not execute query: ERROR: cannot use column reference in DEFAULT expression
> Command was: ALTER TABLE ONLY public.gtest30_1 ALTER COLUMN b SET DEFAULT (a * 2);

This is the same issue as
<https://www.postgresql.org/message-id/15830.1575468847@sss.pgh.pa.us>.
I will work in it this week.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-02-03 13:23:19 Re: Cache relation sizes?
Previous Message 曾文旌 (义从) 2020-02-03 13:03:11 Re: [Proposal] Global temporary tables