pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_dump: Fix dumping of inherited generated columns 3+ messages / 1 participants [nested] [flat]
* pgsql: pg_dump: Fix dumping of inherited generated columns @ 2021-02-03 11:54 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2021-02-03 11:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_dump: Fix dumping of inherited generated columns Generation expressions of generated columns are always inherited, so there is no need to set them separately in child tables, and there is no syntax to do so either. The code previously used the code paths for the handling of default values, for which different rules apply; in particular it might want to set a default value explicitly for an inherited column. This resulted in unrestorable dumps. For generated columns, just skip them in inherited tables. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1d3ce0223c6a527c2f464fb8e6b3874be4e7332e Modified Files -------------- src/bin/pg_dump/common.c | 31 +++++++++++++++++++++------ src/bin/pg_dump/pg_dump.c | 37 +++++++++++++++++++++++++++----- src/bin/pg_dump/t/002_pg_dump.pl | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: pg_dump: Fix dumping of inherited generated columns @ 2021-02-03 11:54 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2021-02-03 11:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_dump: Fix dumping of inherited generated columns Generation expressions of generated columns are always inherited, so there is no need to set them separately in child tables, and there is no syntax to do so either. The code previously used the code paths for the handling of default values, for which different rules apply; in particular it might want to set a default value explicitly for an inherited column. This resulted in unrestorable dumps. For generated columns, just skip them in inherited tables. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0bf83648a52df96f7c8677edbbdf141bfa0cf32b Modified Files -------------- src/bin/pg_dump/common.c | 31 +++++++++++++++++++++------ src/bin/pg_dump/pg_dump.c | 37 +++++++++++++++++++++++++++----- src/bin/pg_dump/t/002_pg_dump.pl | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: pg_dump: Fix dumping of inherited generated columns @ 2021-02-03 11:54 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 3+ messages in thread From: Peter Eisentraut @ 2021-02-03 11:54 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_dump: Fix dumping of inherited generated columns Generation expressions of generated columns are always inherited, so there is no need to set them separately in child tables, and there is no syntax to do so either. The code previously used the code paths for the handling of default values, for which different rules apply; in particular it might want to set a default value explicitly for an inherited column. This resulted in unrestorable dumps. For generated columns, just skip them in inherited tables. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/1dd6baf7880240102aff76a1a28098228915de14 Modified Files -------------- src/bin/pg_dump/common.c | 31 +++++++++++++++++++++------ src/bin/pg_dump/pg_dump.c | 37 +++++++++++++++++++++++++++----- src/bin/pg_dump/t/002_pg_dump.pl | 46 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-02-03 11:54 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-02-03 11:54 pgsql: pg_dump: Fix dumping of inherited generated columns Peter Eisentraut <peter@eisentraut.org> 2021-02-03 11:54 pgsql: pg_dump: Fix dumping of inherited generated columns Peter Eisentraut <peter@eisentraut.org> 2021-02-03 11:54 pgsql: pg_dump: Fix dumping of inherited generated columns Peter Eisentraut <peter@eisentraut.org>
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