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 72735554DD for ; Thu, 10 Mar 2005 00:57:42 +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 07316-09 for ; Thu, 10 Mar 2005 00:57:32 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7E75454E9E for ; Thu, 10 Mar 2005 00:57:31 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j2A0vNIh009372; Wed, 9 Mar 2005 19:57:23 -0500 (EST) To: "Subbiah, Stalin" Cc: pgsql-admin@postgresql.org Subject: Re: Schemas to Search_path In-reply-to: <6B26A56846293C4488B54CF3E4403354339DA6@mxca2.corp.netopia.com> References: <6B26A56846293C4488B54CF3E4403354339DA6@mxca2.corp.netopia.com> Comments: In-reply-to "Subbiah, Stalin" message dated "Wed, 09 Mar 2005 16:44:23 -0800" Date: Wed, 09 Mar 2005 19:57:23 -0500 Message-ID: <9371.1110416243@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/140 X-Sequence-Number: 16638 "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 $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