X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9E3FC53C92 for ; Thu, 10 Mar 2005 01:21:12 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14006-03 for ; Thu, 10 Mar 2005 01:21:03 +0000 (GMT) Received: from mxca2.corp.netopia.com (host222.netopia.com [65.206.239.222]) by svr1.postgresql.org (Postfix) with ESMTP id D0CB952A76 for ; Thu, 10 Mar 2005 01:21:02 +0000 (GMT) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: Schemas to Search_path Date: Wed, 9 Mar 2005 17:21:05 -0800 Message-ID: <6B26A56846293C4488B54CF3E4403354339DF2@mxca2.corp.netopia.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Schemas to Search_path Thread-Index: AcUlDCg8vCQgljzySm6R9AIq80/vwwAAWiZw From: "Subbiah, Stalin" To: "Tom Lane" Cc: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.029 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/141 X-Sequence-Number: 16639 I created schema name "foo_schema" different from user name "foo". However, when I created the schema, I had specified authorization set to foo user.=20 Does that mean, if the owner of the schema and schema name are different, then only way, is to set through alter user set or search path correct ? Thanks Much! -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: Wednesday, March 09, 2005 4:57 PM To: Subbiah, Stalin Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Schemas to Search_path=20 "Subbiah, Stalin" 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=20 > $user, public the default ones, shouldn't the table get created in=20 > 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