From 88bd01505eb32b99159ab81a9414a69a074b0235 Mon Sep 17 00:00:00 2001 From: ma91n Date: Thu, 29 Feb 2024 16:40:31 +0900 Subject: [PATCH] remove partition table when using dump command --- cli/dump.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/dump.go b/cli/dump.go index 5f908dc..a902d2b 100644 --- a/cli/dump.go +++ b/cli/dump.go @@ -37,9 +37,12 @@ var query = `SELECT tab.relname AS table_name LEFT OUTER JOIN pg_description coldesc ON tab.relid = coldesc.objoid AND col.ordinal_position = coldesc.objsubid + LEFT OUTER JOIN pg_class pc + ON tab.relid = pc.oid WHERE exists(select 1 FROM tmp_exceltesting_dump_table_name WHERE tab.relname = name) AND tab.schemaname = current_schema() AND col.table_schema = current_schema() + AND pc.relispartition = false ORDER BY tab.relname , col.ordinal_position ; @@ -62,9 +65,12 @@ var queryAll = `SELECT tab.relname AS table_name LEFT OUTER JOIN pg_description coldesc ON tab.relid = coldesc.objoid AND col.ordinal_position = coldesc.objsubid + LEFT OUTER JOIN pg_class pc + ON tab.relid = pc.oid WHERE tab.schemaname = current_schema() AND col.table_schema = current_schema() + AND pc.relispartition = false ORDER BY tab.relname , col.ordinal_position ;