Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XWIT2-0000Yr-JL for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Sep 2014 05:16:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XWIT2-00035m-3U for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Sep 2014 05:16:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XWIT1-00035g-IC for pgsql-jdbc@postgresql.org; Tue, 23 Sep 2014 05:16:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XWISt-0002Uo-9W for pgsql-jdbc@postgresql.org; Tue, 23 Sep 2014 05:16:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s8N5GV8j006316; Tue, 23 Sep 2014 01:16:31 -0400 From: Tom Lane To: John R Pierce cc: pgsql-jdbc@postgresql.org Subject: Re: Patch to allow setting schema/search_path in the connectionURL In-reply-to: <542100AD.9000701@hogranch.com> References: <4873F034.8010301@scharp.org> <487478FC.5080607@enterprisedb.com> <1410977074803-5819366.post@n5.nabble.com> <1411069664209-5819543.post@n5.nabble.com> <541C5FE2.9070506@bbs.darktech.org> <1411448121224-5820023.post@n5.nabble.com> <1411448577700-5820026.post@n5.nabble.com> <542100AD.9000701@hogranch.com> Comments: In-reply-to John R Pierce message dated "Mon, 22 Sep 2014 22:10:05 -0700" Date: Tue, 23 Sep 2014 01:16:31 -0400 Message-ID: <6315.1411449391@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org John R Pierce writes: > On 9/22/2014 10:02 PM, stagirus wrote: >> I thought the following context might be helpful. We have been using Oracle. >> It conveniently and transparently relates a user to a schema. > postgres' default search_path is $USER,public... so if there's a schema > the same name as the user role, then it will look for objects there > before it looks in public... which as far as I can tell is exactly what > you're saying Oracle does. Quite. You do have to create a schema having the same name as the user (and owned by that user), but if you do that then you should get similar behavior with the default search path. There is some documentation about this in the fine manual; see http://www.postgresql.org/docs/9.3/static/ddl-schemas.html particularly the last two sections on that page. regards, tom lane -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc