Skip site navigation (1) Skip section navigation (2)

Re: Revisiting BUG #3684: After dump/restore, schema PUBLIC always exists

From: Pedro Gimeno <pgsql-001(at)personal(dot)formauri(dot)es>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Revisiting BUG #3684: After dump/restore, schema PUBLIC always exists
Date: 2007-11-09 23:42:34
Message-ID: 1194651754l.7868l.4l@dirtecnica.formauri.es (view raw or flat)
Thread:
Lists: pgsql-bugs
Bruce Momjian wrote:

> The fact is that 'public' is created from template1, so I suppose if
> you remove it from there then new databases will not have it.

That could cause installers for packages using PostgreSQL to fail if  
they create databases and expect "public" to exist.

Furthermore I make my dumps with option -C for pg_dump. The CREATE  
DATABASE statement it generates uses template0 as the template.

> I think it would be odd for pg_dump to remove something that was in
> the database before the restore started.  I am afraid removing it  
> yourself is the only logical option for us.

If that's really the case then please add a note in the docs stating  
that deleted objects may revive, so it's no surprise for those who face  
that for the first time.

-- Pedro Gimeno

In response to

Responses

pgsql-bugs by date

Next:From: Pedro GimenoDate: 2007-11-09 23:44:53
Subject: Re: Revisiting BUG #3684: After dump/restore, schema PUBLIC always exists
Previous:From: Pedro Gimeno ForteaDate: 2007-11-09 23:24:32
Subject: Re: Revisiting BUG #3684: After dump/restore, schema PUBLIC always exists

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group