Skip to content

Commit

Permalink
Merge pull request #52 from future-architect/feature/dump
Browse files Browse the repository at this point in the history
remove partition table when using dump command
  • Loading branch information
ma91n authored Feb 29, 2024
2 parents e7484fb + 88bd015 commit f4cfb1d
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 f4cfb1d

Please sign in to comment.