Can this work?
I guess you need to grant some permissions to the_user
? But what?
(I really don’t care about “security” when all it does is stop things from working.)
$ pg_dump -U the_user -h localhost > "the_database.pg_dump"
Password:
pg_dump: error: query failed: ERROR: permission denied for table price_bands
pg_dump: detail: Query was: LOCK TABLE public.price_bands IN ACCESS SHARE MODE
$