Re: database ownership and dumps - Mailing list pgsql-admin

From Tom Lane
Subject Re: database ownership and dumps
Date
Msg-id 19929.1027621332@sss.pgh.pa.us
Whole thread Raw
In response to database ownership and dumps  (Nicolas Kowalski <Nicolas.Kowalski@imag.fr>)
List pgsql-admin
Nicolas Kowalski <Nicolas.Kowalski@imag.fr> writes:
> CREATE DATABASE "sthomas" WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII';
> UPDATE pg_database SET datdba = <usesysid-for-sthomas>
>  WHERE datname = 'sthomas' ;

This requires that you run the script as a superuser with catupd
enabled.  Pretty ugly.

> Am I wrong ? Couldn't this be the "standard" pg_dump(|all) behaviour ?

There is a better solution in development sources.

            regards, tom lane

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: OS File Size > 1GB
Next
From: Chris Ruprecht
Date:
Subject: Re: OS File Size > 1GB