Skip to content

pg_dump exports all tables even if only one table is checked when export scope set to Database #113

@kiddkyd2

Description

@kiddkyd2

When I use DBeaver PostgreSQL dump tool, there is inconsistent behavior between two databases with identical driver (pg_dump 17):

Case 1 (Correct): PolarDB PostgreSQL instance

I select only one table, set export scope to Tables/Views, DBeaver generates pg_dump command with -t public.table_name, only the target table is dumped as expected.
pg_dump.exe ... -t "public.t_sys_org" pms_test

Case 2 (Wrong): RDS PostgreSQL instance

I manually checked only one single table in the table list, but I accidentally set export scope to Database. DBeaver completely ignores my table selection, generates pg_dump command without any -t parameter, and dumps the entire database instead of the checked single table.
Command snippet (no -t argument):
pg_dump.exe ... pms_test

Expected behavior

If user manually selects specific tables in the table list, DBeaver should respect the checked table list no matter which export scope option I choose, or show a clear warning to notify users that table filters will be discarded under "Database" export scope.

Environment

DBeaver version: 26.1.0.202605311718
pg_dump client version: 17 (bundled in DBeaver driver)
Database type: Alibaba Cloud RDS PostgreSQL / PolarDB PostgreSQL
OS: Windows 11

Additional context

I initially suspected different PostgreSQL server versions caused this difference, but after comparing generated pg_dump commands, the root cause is only the missing -t argument when export scope is set to Database. The server PostgreSQL version has no impact on this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions