Skip site navigation (1) Skip section navigation (2)

Re: [JDBC] Support for JDBC setQueryTimeout, et al.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Radosław Smogura <rsmogura(at)softperience(dot)eu>,Magnus Hagander <magnus(at)hagander(dot)net>,David Fetter <david(at)fetter(dot)org>,Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>,PG Hackers <pgsql-hackers(at)postgresql(dot)org>,PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>,robertmhaas(at)gmail(dot)com
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Date: 2010-10-15 20:58:15
Message-ID: 20101015205815.GU26232@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> 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..
> 
> 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,
		
		Stephen

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2010-10-15 21:03:14
Subject: Re: Git migration deadline for Buildfarm
Previous:From: Dimitri FontaineDate: 2010-10-15 20:45:18
Subject: Trailing Whitespace Tips (was: Re: starting to review the Extend NOT NULL representation to pg_constraint patch)

pgsql-jdbc by date

Next:From: Tom LaneDate: 2010-10-15 21:26:16
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous:From: Tom LaneDate: 2010-10-15 20:22:51
Subject: Re: [JDBC] Support for JDBC setQueryTimeout, et al.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group