Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 887B91337BD5 for ; Fri, 15 Oct 2010 17:58:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 27178-03; Fri, 15 Oct 2010 20:58:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id 6F3261336DB6; Fri, 15 Oct 2010 17:58:15 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id 0EA3D22155; Fri, 15 Oct 2010 16:58:15 -0400 (EDT) Date: Fri, 15 Oct 2010 16:58:15 -0400 From: Stephen Frost To: Tom Lane Cc: Dimitri Fontaine , =?utf8?B?UmFkb3PFgmF3?= Smogura , Magnus Hagander , David Fetter , Kevin Grittner , PG Hackers , PostgreSQL JDBC List , robertmhaas@gmail.com Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al. Message-ID: <20101015205815.GU26232@tamriel.snowman.net> References: <20101012155531.GB29627@fetter.org> <528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu> <20101015142126.GQ26232@tamriel.snowman.net> <20260.1287153534@sss.pgh.pa.us> <20101015145248.GR26232@tamriel.snowman.net> <11068.1287174171@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mWhV44I0cmGjl4H+" Content-Disposition: inline In-Reply-To: <11068.1287174171@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 16:26:48 up 414 days, 7:51, 14 users, load average: 0.04, 0.11, 0.08 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/1050 X-Sequence-Number: 172090 --mWhV44I0cmGjl4H+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > >> The whole problem with search_path and role is very frustrating. We've > >> taken to just hacking things to be dynamic SQL whenever it's > >> role-specific, but that's a really poor solution. I wonder if it would > >> be possible to have the function and prepare'd plan caches be key'd off > >> of the search_path and role too..? So if you change one of those you > >> end up having to re-plan it, but then that's also cached, etc.. >=20 > FWIW, I can see the point of making cached plan lookup be > search-path-specific. But why does the active role need to factor > into it? Because of $user being used in the search_path. Thinking about it, I'm sure we'd handle the look-up at query time and would resolve the $user in the search_path to an actual schema first, so the cache doesn't need to be keyed off role itself. IOW, yeah, you're right, the role doesn't really matter. One thing that occurs to me when I last ran into a problem with this- it was painful to debug because the "permission denied" error didn't indicate which schema the table it was trying to access was in. I wonder if we could fix that. Thanks, =09 Stephen --mWhV44I0cmGjl4H+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAky4wGcACgkQrzgMPqB3kijWNwCfQ9AS7VMwNJS8IXIz/qLBp/zj nrgAnjqEOMaWyEtTwkdCDPHLP8uCDaRK =+k41 -----END PGP SIGNATURE----- --mWhV44I0cmGjl4H+--