pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Subbiah, Stalin <SSubbiah@netopia.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Schemas to Search_path
Date: Wed, 09 Mar 2005 19:57:23 -0500
Message-ID: <9371.1110416243@sss.pgh.pa.us> (raw)
In-Reply-To: <6B26A56846293C4488B54CF3E4403354339DA6@mxca2.corp.netopia.com>
References: <6B26A56846293C4488B54CF3E4403354339DA6@mxca2.corp.netopia.com>

"Subbiah, Stalin" <SSubbiah@netopia.com> writes:
> I logged into foodb as foo user and tried to create a table. Bang!
> ERROR:  no schema has been selected to create in. search_path had $user,
> public the default ones, shouldn't the table get created in user's
> authorized schema.

Which one?

Now, if you make the schema name the same as the user name, it will do
what you want --- that's what the $user is for.  If you want some other
schema that happens to belong to that user to be the default, you have
to adjust the normal value of search_path.  (See ALTER USER SET if you'd
like that adjustment to be done for you automatically at each login.)

			regards, tom lane



view thread (4+ messages)  latest in thread

Message-ID: <9371.1110416243@sss.pgh.pa.us>
Permalink:  ../9371.1110416243@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9371.1110416243@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, SSubbiah@netopia.com
  Subject: Re: Schemas to Search_path
  In-Reply-To: <9371.1110416243@sss.pgh.pa.us>
  References: <6B26A56846293C4488B54CF3E4403354339DA6@mxca2.corp.netopia.com> <9371.1110416243@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox