Re: public schema doubt
От | Scott Marlowe |
---|---|
Тема | Re: public schema doubt |
Дата | |
Msg-id | dcc563d10711160816n1d46bc7agb1f54c7b520e2831@mail.gmail.com обсуждение исходный текст |
Ответ на | public schema doubt (mailtolouis2020-postgres@yahoo.com) |
Список | pgsql-general |
On Nov 16, 2007 8:56 AM, <mailtolouis2020-postgres@yahoo.com> wrote: > > > Hello, > > I did a migration from 8.2.4 to 8.2.5, Just FYI, from 8.2.4 to 8.2.5 doesn't require a dump / restore, you can update minor versions in place. > I used pg_dumpall to backup all the > db and then restore it into 8.2.5. In my 8.2.4 db, I don't have public > schema (it was dropped when I create the db, so only myschema is there), but > when I restore to 8.2.5, I found that it created a public schema for me. A freshly created database has a public schema by default, because it is created form the template1 database which has a public schema. If you want a new database to have a different schema than public, you can make that change to template1 and your new dbs will have that setup. > Should I just let the public schema there? Will it cause any problem? Generally, no. > In the > postgres doc http://www.postgresql.org/docs/8.2/interactive/ddl-schemas.html > (5.7.2) it said if I create a table without specify any schema name, it will > put it into public schema, so I test it in my case, but it not doing it, the > table is create under myschema, strange. And I check the search_path, it > show "$user",public . Then the user you're creating the table with has a different search_path set than the default one of 'public',$user. Most likely the result of an alter user command. Could also be an alter database command.
В списке pgsql-general по дате отправления: