From 74563f6b90216180fc13649725179fc119dddeb5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 20 Feb 2024 11:10:59 +0100 Subject: Revert "Improve compression and storage support with inheritance" This reverts commit 0413a556990ba628a3de8a0b58be020fd9a14ed0. pg_dump cannot currently dump all the structures that are allowed by this patch. This needs more work in pg_dump and more test coverage. Discussion: https://www.postgresql.org/message-id/flat/24656cec-d6ef-4d15-8b5b-e8dfc9c833a7@eisentraut.org --- src/backend/parser/parse_utilcmd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/parser/parse_utilcmd.c') diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 8dcf794ca27..c7efd8d8cee 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -1134,14 +1134,15 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla /* Likewise, copy storage if requested */ if (table_like_clause->options & CREATE_TABLE_LIKE_STORAGE) - def->storage_name = GetAttributeStorageName(attribute->attstorage); + def->storage = attribute->attstorage; else - def->storage_name = NULL; + def->storage = 0; /* Likewise, copy compression if requested */ if ((table_like_clause->options & CREATE_TABLE_LIKE_COMPRESSION) != 0 && CompressionMethodIsValid(attribute->attcompression)) - def->compression = GetCompressionMethodName(attribute->attcompression); + def->compression = + pstrdup(GetCompressionMethodName(attribute->attcompression)); else def->compression = NULL; -- cgit v1.2.3