Skip to content

Commit

Permalink
remove partition table when using dump command
Browse files Browse the repository at this point in the history
  • Loading branch information
ma91n committed Feb 29, 2024
1 parent e7484fb commit 88bd015
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
;
Expand All @@ -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
;
Expand Down

0 comments on commit 88bd015

Please sign in to comment.