Nicolas Kowalski <Nicolas(dot)Kowalski(at)imag(dot)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