From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: ijustloveit13@gmail.com
Subject: BUG #17960: pg_dump does not backup generated columns correctly.
Date: Sun, 04 Jun 2023 12:20:56 +0000
Message-ID: <17960-1a424b3d6792d769@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 17960
Logged by: Sajjad Hassany Pazoky
Email address: ijustloveit13@gmail.com
PostgreSQL version: 15.2
Operating system: Windows
Description:
Hi
Dear are two stackoverflow bugs reported an none had an answer:
https://stackoverflow.com/questions/64600614/restoring-pg-database-from-dump-fails-due-to-generated-...https://dba.stackexchange.com/questions/327852/pg-dump-unable-to-produce-a-valid-backup
pg_dump does not wite DEFAULT for generated columns. So, it produces error
when restoring.
The strange part is that when I create the table again, fill it with data
and use pg_dump to bacup, it is correct, but the current table in the
database producecs wrong backup.
I tested this on Postgresql 13, 14, and 15.
I'm available if any assistance is needed.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, ijustloveit13@gmail.com
Subject: Re: BUG #17960: pg_dump does not backup generated columns correctly.
In-Reply-To: <17960-1a424b3d6792d769@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox