From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Radosław Smogura <rsmogura@softperience.eu>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: David Fetter <david@fetter.org>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Cc: PostgreSQL JDBC List <pgsql-jdbc@postgresql.org>
Cc: robertmhaas@gmail.com
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: Fri, 15 Oct 2010 17:26:16 -0400
Message-ID: <16569.1287177976@sss.pgh.pa.us> (raw)
In-Reply-To: <20101015205815.GU26232@tamriel.snowman.net>
References: <20101012155531.GB29627@fetter.org>
<AANLkTi=m7tzv7RzCmqD6ARWm_QWbg90Jmd0uTkosiZo4@mail.gmail.com>
<528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu>
<AANLkTinFMPHaa1SH-uf7fqBTkVcMZYRpxqjaaYUKHEHA@mail.gmail.com>
<c17d0cbfea679088a106a9c9b573196c@smogura-softworks.eu>
<20101015142126.GQ26232@tamriel.snowman.net>
<20260.1287153534@sss.pgh.pa.us>
<20101015145248.GR26232@tamriel.snowman.net>
<m2iq134414.fsf@2ndQuadrant.fr>
<11068.1287174171@sss.pgh.pa.us>
<20101015205815.GU26232@tamriel.snowman.net>
Stephen Frost <sfrost@snowman.net> writes:
> 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.
Hm, are you sure you actually got a "permission denied" error? Because
AFAICS such a message would name the schema:
regression=> select * from s1.t1;
ERROR: permission denied for schema s1
The part that is a bit nasty is if you try to put a schema in your
search_path that you don't have permissions for. My recollection is
that we just silently drop it out of the effective search path, so:
regression=> set search_path = s1, public;
SET
regression=> select current_schemas(false);
current_schemas
-----------------
{public}
(1 row)
regression=> select * from t1;
ERROR: relation "t1" does not exist
This isn't terribly user-friendly, but I'm not sure how to do better.
We can't really throw an error at the point of setting the search
path, because there are too many scenarios where a default search
path is effectively set up for you, and it might or might not list
some unsearchable (or even nonexistent) schemas.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, sfrost@snowman.net, dimitri@2ndQuadrant.fr, rsmogura@softperience.eu, magnus@hagander.net, david@fetter.org, Kevin.Grittner@wicourts.gov, pgsql-hackers@postgresql.org, robertmhaas@gmail.com
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
In-Reply-To: <16569.1287177976@sss.pgh.pa.us>
References: <20101012155531.GB29627@fetter.org> <AANLkTi=m7tzv7RzCmqD6ARWm_QWbg90Jmd0uTkosiZo4@mail.gmail.com> <528f31015d6bf68650646b9b4ba71a10@smogura-softworks.eu> <AANLkTinFMPHaa1SH-uf7fqBTkVcMZYRpxqjaaYUKHEHA@mail.gmail.com> <c17d0cbfea679088a106a9c9b573196c@smogura-softworks.eu> <20101015142126.GQ26232@tamriel.snowman.net> <20260.1287153534@sss.pgh.pa.us> <20101015145248.GR26232@tamriel.snowman.net> <m2iq134414.fsf@2ndQuadrant.fr> <11068.1287174171@sss.pgh.pa.us> <20101015205815.GU26232@tamriel.snowman.net> <16569.1287177976@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox