PostgreSQL Notes

Version 4 by Stephane Carrez

Get database schema

sudo -u postgres pg_dump --schema-only bacula

Change table owner

bacula tables were owned by postgresql

sudo -u postgres bacula
\d
alter table public.unsavedfiles owner to bacula;