Unix Technical Forum

Re: public schema doubt

This is a discussion on Re: public schema doubt within the Pgsql General forums, part of the PostgreSQL category; --> Hello Martin, Yes, SHOW search_path show this "$user",public . Oh yes, I get it now, the "$user" will take ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-09-2008, 11:10 PM
mailtolouis2020-postgres@yahoo.com
 
Posts: n/a
Default Re: public schema doubt

Hello Martin,

Yes, SHOW search_path show this
"$user",public .

Oh yes, I get it now, the "$user" will take priority.

Another question, this public schema, in the usual practice way, do you delete it or just leave it there and create your own schema?

Regards
Louis


----- Original Message ----
From: Martin Gainty <mgainty@hotmail.com>
To: mailtolouis2020-postgres@yahoo.com
Sent: Friday, November 16, 2007 3:17:40 PM
Subject: RE: [GENERAL] public schema doubt

Hello Louis

SHOW search_path

if public is not on search_path or does'nt come first then
SET search_path TO public,$user;

HTH/
Martin

______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.






Hello,

I did a migration from 8.2.4 to 8.2.5, 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. So why it doing this for me? I thought it should restore back excatly the same what I backup from 8.2.4?

Should I just let the public schema there? Will it cause any problem? In the postgres doc http://www.postgresql.org/docs/8.2/i...l-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 .

Could someone explain it to me?

Thanks
Louis






Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-09-2008, 11:10 PM
Scott Marlowe
 
Posts: n/a
Default Re: public schema doubt

On Nov 16, 2007 10:26 AM, <mailtolouis2020-postgres@yahoo.com> wrote:
>
>
> Hello Martin,
>
> Yes, SHOW search_path show this
> "$user",public .
>
> Oh yes, I get it now, the "$user" will take priority.
>
> Another question, this public schema, in the usual practice way, do you
> delete it or just leave it there and create your own schema?


I leave it in place. IT doesn't hurt anything really.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-09-2008, 11:11 PM
Martijn van Oosterhout
 
Posts: n/a
Default Re: public schema doubt

On Fri, Nov 16, 2007 at 11:01:17AM -0600, Scott Marlowe wrote:
> > Another question, this public schema, in the usual practice way, do you
> > delete it or just leave it there and create your own schema?

>
> I leave it in place. IT doesn't hurt anything really.


Alternativly, you can revoke all permissions from it...

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFHPiJ2IB7bNG8LQkwRAnKpAJ4+WVvcrgTjyZGop0JPSc 9qg7uNzwCfe/cx
BTESC7G2DqckLnWuaLUamR0=
=SdxD
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com