Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DA83BD75D0B for ; Mon, 30 Jul 2012 21:42:07 -0300 (ADT) Received: from smtp104.prem.mail.ac4.yahoo.com ([76.13.13.43]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Sw0XD-0003cX-60 for pgsql-jdbc@postgresql.org; Tue, 31 Jul 2012 00:42:06 +0000 Received: (qmail 72112 invoked from network); 31 Jul 2012 00:41:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=6IT03Aj0R725Pnq6khGhsHSWrJ4U1MghvpwhHFz6VO8HyLrWhF70PLvmr5SvwnpTekQxHS0emBtzsLWZaRFL/gs5z+VLTKJrZa++6iJ6LpD7JE1lO3zg2p+l5nZ3yddcucWvOqGbb02FOC2p5BBh+GsxTRn+p90MGVwYr0eakdE= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1343695308; bh=5K/Bm9Z8+GWJp3VnNjh58ngGmRT96IZ1G85eQSqm4QM=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-Mailer:Thread-Index:Content-Language; b=xC2tv+nilWaCv9nEWQvSNUBeA7O7f4Z87isAwqtDRx/6+Q/H/dTd7TlhOyvbeRRlUE3KmYkmX3YOduv6f9z9cBUH1GyXaAMNOHzrAlHcrdIJmh/16hwI2uDhGyyvMKMdBPuAQUdUAiLpgloIKH2fRl3ZCfR5L0Q2+3zGOTkIg7c= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: W9EmwyYVM1k.ryWju2Ueb4ayEoa8VDxeH5zCWGalNFIpz66 ah2611x7qPXlr9TiHoWe8US6QvtzmNmdOnd5ZtCPTZC5_ViU9gnAFGv15Zlv xwon4AsLpWTYw4Un_IG3sVX1D.VKLkmI6BvvtfEAxMNL_HtUAPZ7W4ug87Os HkBak0jO7L7.un0ZIY3iPCC1Zxsjyp2xuuNvpLC6zp3_XCt4.fdTUU3Mbj1N B9cnNNBy9eq82a50VmMZWuWv7fpwCLQh7_ntE75soxTLLurnDXHW3qfbL70W 0RDt9KFdNc8QmW0TZ3hHL1aiUcD5iLxCcfdVLy0UWa1Sa57D5HgbRrkGxejo j6klZJtlDm.I9HWUaAXzYgcZ_HySDN3yuVDzZimm135KgkZKpA8SbTmWiIce cJ.K9kfhed6vccDgQX9Q1jRiFOAVPwuJfz.mcCAZh6IKMiUgNKDLloK.MLhf rxguVWSFQZkUhYz2H_aHt3nVcVNgNuQNQhJp0oW.oRKCVEct1yJxtV67mtqR 2nnOSIXHVqcsBtByC1.TCB3LaK5RFzGGXWckx5U7_eU4iJ8hiWuArb66u8B3 xfTwA3hob_lguzqV2J14k5fvIO9i8qeeSh4sf8sfgxhMZ2XjKjGs40KTXonM c41eeLYPDu_iLmj2WbDYpSV_X4LhF4OWz5SgpByN.yiomsr7PuTMsoJa2jfv LQuGNzuASJPmS6VkyWUmJYXRdNQ-- X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@24.93.23.188 with login) by smtp104.prem.mail.ac4.yahoo.com with SMTP; 30 Jul 2012 17:41:47 -0700 PDT From: "David Johnston" To: "'Julien Demoor'" , References: In-Reply-To: Subject: Re: Search path in connection string Date: Mon, 30 Jul 2012 20:41:17 -0400 Message-ID: <023a01cd6eb5$32a1e8a0$97e5b9e0$@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_023B_01CD6E93.AB91CF40" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHap512xOYtUWY/E9miY2tbRKZ8ppcoGjNw Content-Language: en-us X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201207/53 X-Sequence-Number: 23151 This is a multipart message in MIME format. ------=_NextPart_000_023B_01CD6E93.AB91CF40 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: pgsql-jdbc-owner@postgresql.org = [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Julien Demoor Sent: Monday, July 30, 2012 8:56 AM To: pgsql-jdbc@postgresql.org Subject: [JDBC] Search path in connection string =20 There have been a number of messages on this list suggesting that the = Postgres JDBC driver should support setting the search path as part of = the connection string. =20 Can this be considered? =20 I have a use case where there doesn't appear to be any good = alternatives: using BIRT, with multiple clients sharing a Postgres = database with one schema each, one cannot just execute a SET SCHEMA = statement (UPDATE pg_settings ... is not possible either) and qualifying = object names is also not always possible (say, if there are stored = procedures involved that use unqualified object names). =20 Besides being useful in this case and surely others, this feature makes = sense: schemas can be used to offer separation of database objects very = similar to that offered by having multiple databases, and the database = itself is part of the connection string. =20 The patch proposed in = http://postgresql.1045698.n5.nabble.com/Patch-to-allow-setting-schema-sea= rch-path-in-the-connectionURL-td2174512.html is still applicable. =20 Regards, Julien =20 =20 You can customize the connection string to accomplish this. You vary = the =E2=80=9Cuser=E2=80=9D that is connecting and configure a = search_path specific to that user. =20 ALTER ROLE custom_role SET search_path =3D =E2=80=A6 =20 David J. =20 ------=_NextPart_000_023B_01CD6E93.AB91CF40 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

From:= = pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] = On Behalf Of Julien Demoor
Sent: Monday, July 30, 2012 = 8:56 AM
To: pgsql-jdbc@postgresql.org
Subject: = [JDBC] Search path in connection = string

 

There have = been a number of messages on this list suggesting that the Postgres JDBC = driver should support setting the search path as part of the connection = string.

 

Can this be considered?

 

I = have a use case where there doesn't appear to be any good alternatives: = using BIRT, with multiple clients sharing a Postgres database with one = schema each, one cannot just execute a SET SCHEMA statement (UPDATE = pg_settings ... is not possible either) and qualifying object names is = also not always possible (say, if there are stored procedures involved = that use unqualified object names).

 

Besides being useful in this case and surely others, = this feature makes sense: schemas can be used to offer separation of = database objects very similar to that offered by having multiple = databases, and the database itself is part of the connection = string.

 

 

Regards,

Julien

 

 

You can customize the connection string to accomplish this.=C2=A0 You = vary the =E2=80=9Cuser=E2=80=9D that is connecting and configure a = search_path specific to that user.

 

ALTER ROLE custom_role SET search_path =3D = =E2=80=A6

 

David J.

 

------=_NextPart_000_023B_01CD6E93.AB91CF40--